Every couple hours I always get a few apache processes that for some
reason never quit properly. When I get enough of them my apache no
longer responds to any web requests and I need to restart it. It looks
something like this (notice the times for the first 3 apache processes):
www-data 19283 16243 0 18:24 ? 00:00:00 /usr/sbin/apache2 -k
start
www-data 19426 16243 0 18:32 ? 00:00:00 /usr/sbin/apache2 -k
start
www-data 19437 16243 0 20:31 ? 00:00:00 /usr/sbin/apache2 -k
start
www-data 19460 16243 0 21:49 ? 00:00:00 /usr/sbin/apache2 -k
start
www-data 19470 16243 0 21:52 ? 00:00:00 /usr/sbin/apache2 -k
start
www-data 19483 16243 0 21:54 ? 00:00:00 /usr/sbin/apache2 -k
start
www-data 19487 16243 0 21:54 ? 00:00:00 /usr/sbin/apache2 -k
start
www-data 19489 16243 0 21:54 ? 00:00:00 /usr/sbin/apache2 -k
start
www-data 19493 16243 0 21:54 ? 00:00:00 /usr/sbin/apache2 -k
start
www-data 19501 16243 0 21:55 ? 00:00:00 /usr/sbin/apache2 -k
start
I have killed all of them currently that haven’t been spawned in the
past 15 minutes but I think they are stuck at sending response…last
time i checked under http://localhost/server-status
the only message in my apache error logs are occasionaly:
[Mon Aug 04 21:25:13 2008] [info] server seems busy, (you may need to
increase StartServers, or Min/MaxSpareServers), spawning 8 children,
there are 4 idle, and 21 total children
[Mon Aug 04 22:05:28 2008] [info] server seems busy, (you may need to
increase StartServers, or Min/MaxSpareServers), spawning 8 children,
there are 3 idle, and 19 total children
which I have just upped my server settings (i dont think the stalled
processes are related to those error message though):
Timeout 120
MaxKeepAliveRequests 200
KeepAliveTimeout 3
is there any way to find out what the apache processes are stalled on?
I think it might be related to some of my new code because it just
started happening recently but I can’t reproduce it on demand.
i’m running ubuntu hardy 8.04. thanks!