...

View Full Version : Reached MaxCients setting, but no traffic!



TheBlueblib
09-05-2010, 03:15 PM
I'm renting a somewhat powerful server with 12GB of RAM and twin xeon cpus running ubuntu 10.04 x64. I installed apache and mysql, I loaded the mod_rewrite module, and the site works fine!

Until a couple of hours when the site becomes unresponsive. I'm still able to SSH into the server, I look at the error log and I see this:


server reached MaxClients setting, consider raising the MaxClients setting

But apache serves maybe 10 visitors a day! The memory has barely been touched, as well as the cpu. I raised the maxclients setting to 800 where possible. Here are my current settings:

<IfModule mpm_prefork_module>
ServerLimit 800
StartServers 5
MinSpareServers 5
MaxSpareServers 20
MaxClients 800
MaxRequestsPerChild 0
</IfModule>
<IfModule mpm_worker_module>
ServerLimit 800
StartServers 2
MaxClients 800
MinSpareThreads 20
MaxSpareThreads 75
ThreadsPerChild 20
MaxRequestsPerChild 0
</IfModule>
<IfModule mpm_event_module>
ServerLimit 800
StartServers 2
MaxClients 800
MinSpareThreads 25
MaxSpareThreads 75
ThreadLimit 64
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>
If I restart Apache, the site works for another couple hours until I get the same MaxClients error. Any help would be very much appreciated, I can't let this server suck up my money while being useless.

oracleguy
09-06-2010, 01:54 AM
Why did you set MaxRequestsPerChild to 0? If you do that the child process will never terminate. Which is probably how you are maxing out the number of connections.

See: http://httpd.apache.org/docs/2.0/mod/mpm_common.html#maxrequestsperchild

TheBlueblib
09-07-2010, 03:14 AM
Why did you set MaxRequestsPerChild to 0? If you do that the child process will never terminate. Which is probably how you are maxing out the number of connections.

See: http://httpd.apache.org/docs/2.0/mod/mpm_common.html#maxrequestsperchild

I changed it to 900, and the same error occurred again.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum