Forum Moderators: phranque

Message Too Old, No Replies

Review my prefork & working MPM variables?

         

chien_fu

4:20 pm on May 2, 2012 (gmt 0)

10+ Year Member



I'm in over my head with Apache and my server keeps crashing. It gets itself into some sort of overload where the IO rate and Swap rate go through the roof. Any sites on the server are not accessible at that time. It may stop by itself after a while, but usually goes for hours unless I do something about it. My only option (that I know of) when this happens is to restart the server.

I've had success playing with the apache variables to make the problem go away, at least for a while. Below is from my apache2.conf file:


#prefork MPM
<IfModule mpm_prefork_module>
StartServers 1
MinSpareServers 2
MaxSpareServers 5
MaxClients 20
MaxRequestsPerChild 1000
</IfModule>

<IfModule mpm_worker_module>
StartServers 2
MinSpareThreads 25
MaxSpareThreads 75
ThreadLimit 64
ThreadsPerChild 25
MaxClients 150
MaxRequestsPerChild 1000
</IfModule>


Does anything here look strange to you?
Is there anything you would change to avoid overloading the server?
Am I actually limiting the site to 20 simultaneous users with the MaxClients variable?


I really don't know what any of the variables actually do... I've had minimal success tweaking one thing at a time and waiting to see if it crashes again. I've been struggling with this for 6 months or so with a half-crippled website and just don't know what to do or who to ask. Please let me know if you have any wisdom to bestow..

THANK YOU!