View Single Post
  #1  
Old 7th June 2013, 19:25
mzandstra mzandstra is offline
Junior Member
 
Join Date: Mar 2013
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default Thrashing issues with mpm-itk

Hi,

I'm using a 2 VPSes (1 apache, 1 mysql) to run ~30 php/mysql sites. It's a shared-user environment, so I went with mpm-itk. My problem now is that apache seems to be ignoring my ServerLimit and MaxClients settings and ending up in swap, which causes all the sites to crash.

Relevant chunk of httpd.conf:

Code:
<IfModule mpm_itk_module>
        ServerLimit             30
        StartServers            5
        MinSpareServers          3
        MaxSpareServers         7
        MaxClients              30
        MaxRequestsPerChild   1000
        AssignUserId apache apache
</IfModule>
I've confirmed that mpm-itk is being used, and this is CentOS 5.5 with 1 GB RAM. I wrote a shell script / cron job to check apache's memory usage every 5 minutes, here's some of the output:

Code:
06-07-2013 14:55:02 - 76 MB Free with 52 httpd processes of average size 20895
06-07-2013 15:00:01 - 319 MB Free with 62 httpd processes of average size 18776
06-07-2013 15:05:02 - 137 MB Free with 58 httpd processes of average size 20388
06-07-2013 15:10:02 - 94 MB Free with 55 httpd processes of average size 22005
06-07-2013 15:15:03 - 91 MB Free with 55 httpd processes of average size 20211
06-07-2013 15:20:02 - 121 MB Free with 62 httpd processes of average size 18422
06-07-2013 15:25:01 - 859 MB Free with 10 httpd processes of average size 12281
06-07-2013 15:30:01 - 845 MB Free with 10 httpd processes of average size 11435
06-07-2013 15:35:01 - 852 MB Free with 10 httpd processes of average size 10672
As you can see, apache is going way over the limit of 30 threads I set. Anyone know why this is? I installed mpm-itk from the CentOS repo, not as a patch.

Thanks,
-michael
Reply With Quote
Sponsored Links