Apache problems
I recently moved to Slicehost because of their VPS hosting, so now I have a server all to myself. Unfortunately, I managed to screw it up quite badly when I upgraded it to Feisty. Apparently, the latest apache2 has a penchant for spawning 200 processes and eating all the memory, crashing the server. I am trying to figure out how to stop this from happening, but until then this site will crash a lot :(
If it's down, please try later... If anyone knows what causes this and how I can fix it, please please post a comment, thank you.
Update: I have reduced MaxClients to 15 from 150, I hope this will fix things. It will certainly not spawn as many processes, but the thing is that it shouldn't have spawned them to begin with, so now it might just queue the other requests and stop responding. Oh well, at least it won't run out of memory and I'll be able to SSH to it.
Second update: I have switched to apache's mpm_worker mode with fcgid, changed keepalives to 15 and keepalive timeout to 3. I think it works better already, but only time will tell. I'd like to thank Vizzini for his great suggestions in optimizing apache, it runs much better now.
If you don't depend too much on some specific Apache modules try some of the more lightweight web servers, like nginx or lighttpd. The thread per connection (or even worse the process per connection) configuration is a bad, bad, bad option...
Stelios
- reply
Submitted by ssfak (not verified) on Fri, 13/07/2007 - 08:40.I have looked into those, but I rather need many of apache's modules, so they are not a very viable option. Lighttpd looks very interesting for serving static content, thank you for the suggestion.
---
Vidi, Vici, Veni.
- reply
Submitted by Poromenos on Fri, 13/07/2007 - 20:25.