Am 16.09.2012 08:55, schrieb Jarry: > Hi, > strange thing happened to my web-server (apache-2.2.22-r1): > it started forking untill it used all ram/swap and stopped > responding. I counted ~60 apache processes running (ps -a), > all sleeping, top showed no load except all memory being used. > Log-files showed nothing suspicious to me, except for a few > "GET / HTTP/1.1 200 40" messages at the time when apache > was already unable to send reply. > > Apparently my apache is not correctly configured when it > "forked to death", but maybe someone can help me. I have > about 1GB memory for apache. What should I change in my > config so that apache never runs out of memory? > > server-info: > Timeouts: connection: 60 keep-alive: 15 > MPM Name: Prefork > MPM Information: Max Daemons: 150 Threaded: no Forked: yes > Module Name: prefork.c > 31: StartServers 5 > 32: MinSpareServers 5 > 33: MaxSpareServers 10 > 34: MaxClients 150 > > Jarry >
Hi, try reducing MaxClients to 64, StartServers and MinSpareServers to 2 and then observe how things develop. If you then feel apache is to slow to respond to request under load, try increasing MinSpareServer one at a time. But always keep in mind: every fork of apache eats your memory.