Apache seems to stop responding sometimes even though apache processes are still running.
After restarting apache, the load average usually shoots up from 1 - 2 to 13 - 15 in a matter of seconds.
What would the cause of this be, or how could I find out why apache stops serving?
My httpd.conf is:
<IfModule mpm_prefork_module>
StartServers 8
MinSpareServers 5
MaxSpareServers 20
MaxClients 50
ServerLimit 50
MaxRequestsPerChild 4000
</IfModule>
It's running on an EC2 c1.medium (1.7 GB of memory)
Thanks
50 maxclients combined with non-expiring http sessions. Increase your maxclients.
The answer to this one is sadly not so easy. It could be so much thing.
But here is what I would do
- Unload all modules your application does not need
- Remove all vhosts, see if it persists.
- Close all services but sshd and restart apache, is the result the same? Some services could interact with apache.
- Update apache and all modules.
Another thing that I would consider is that there is an issue with the process launch. I've seen once a badly configured server with 125 spare servers, restarting the service was taking 5 minutes just to launch the spare servers. I know you do not have that much, but if starting a thread takes too much ressource or hang, this could be the source of your service stopping working.
Try lowering the spare servers, see if the load decrease, try upping it, see if the load gets higher. But still, I would consider updating.
Good luck!