TheBlueblib
09-05-2010, 02: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.
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.