Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

we have a mail service with these details:

    1-Centos 6.4
    2:Postfix 2.6.6
    3:roundcube 0.8 
    5:mysql-server 5.1.71

everything is ok but in peak usage time roundcube sleeped connections increases from 1 or 2 or 3 to 270 in less than 10 minutes and apache opened files (measured by lsof) increase from 4000 to 20000 in that peak time.

this is apache conf: (apache works in prefork mode)

PidFile run/
Timeout 60
KeepAlive On
MaxKeepAliveRequests 100
<IfModule prefork.c>
StartServers       8
MinSpareServers    5
MaxSpareServers   20
ServerLimit      256
MaxClients       256
MaxRequestsPerChild  4000
TraceEnable off
LimitRequestLine 1024
LimitRequestFields 100
LimitRequestFieldsize 1024
LimitRequestBody 10241024

and here is mysql config:

max_connections        = 600
max_allowed_packet    = 16M
key_buffer        =256M

when sleeped connections of roundcube increased to >100 ,almost services (web,mail,mysql) go down....

thanks for any suggestion.

share|improve this question
1. How did you install your php? 2. How much your RAM/CPU? free -m;cat /proc/cpuinfo; – PersianGulf Apr 10 '14 at 9:09
You have decide use prefork or apache worker , so read the following link : – PersianGulf Apr 10 '14 at 9:13
mysql down or apache ? or all of your machine ....? – PersianGulf Apr 10 '14 at 9:16
install php from repository (php 5.2.10) 256G RAM 64 Cores CPU 2.4GHz – Sasan torabkheslat Apr 10 '14 at 12:31
in peak time all services go down – Sasan torabkheslat Apr 10 '14 at 12:32

The Answer is:

I have edit apache max_client option to lower value 256 --> 50 why!?

for (still) unknown issue all the preforked apache processes take CPU usage about 100% (100% usage of that core running preforked apache process for few moments)

So system go Down , because system has 64 CPU cores when all the 256 processes of apache use 100% cpu usage , system and services go down

issue still exist but services has no problem I think issue related to network attacks (our monitoring tools report many attacks per day), that sometimes make problem such as resource locking or something else

thank you for all suggestion.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.