You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Nico Sabbi <ns...@tiscali.it> on 2004/10/14 12:53:42 UTC
[users@httpd] Apache taking 99% CPU load
Hi,
I have an apache-1.3.31 web server on a Mandrake 10.0 system, statically
compiled with mod_perl,
loading all the other modules as DSO:
|*
$ /usr/sbin/httpd-perl -v
Server version: Apache-AdvancedExtranetServer/1.3.31 (Mandrakelinux/4mdk)
Server built: Jul 13 2004 18:34:47
$ /usr/sbin/httpd-perl -l
Compiled-in modules:
http_core.c
mod_so.c
mod_perl.c
The configuration I use as at the bottom of this message.
I can't pass to Apache2 because one of my vhosts is strictly tied to
mod_perl1.
I'm running this configuration on a Dual P4 2.8 with 512 KB embedded
cache, 2 GB ram
and Dell Perc 3/DI 72 GB Raid 10 system, and in addition a much less
powerful
server runs exactly the same configuration and vhosts (a combination of
perl/php sites).*|m
|*
My problem is that on the primary server, after 10-15 minutes, I can
always see
some httpd-perl taking 99% cpu usage (although memory usage is not a
problem),
e.g. something like:
top - 12:51:21 up 33 days, 22:14, 1 user, load average: 1.47, 1.18, 2.18
Tasks: 74 total, 4 running, 70 sleeping, 0 stopped, 0 zombie
Cpu(s): 15.7% user, 5.9% system, 0.0% nice, 78.4% idle
Mem: 2068140k total, 869616k used, 1198524k free, 68960k buffers
Swap: 2096440k total, 4232k used, 2092208k free, 254172k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
20517 www 25 0 57508 56m 28m R 99.5 2.8 3:27.61 httpd-perl
20680 www 25 0 34028 33m 8188 R 88.4 1.6 0:00.76 httpd-perl
20513 www 25 0 38592 37m 27m R 16.6 1.9 0:01.51 httpd-perl
20692 root 25 0 908 908 700 R 12.9 0.0 0:00.12 top
1 root 25 0 112 80 64 S 0.0 0.0 0:37.65 init
2 root RT 0 0 0 0 S 0.0 0.0 0:00.01 swapper
3 root RT 0 0 0 0 S 0.0 0.0 0:00.00 swapper
*|
and so on, but the load average gets as high as 80.
I noticed that MaxRequestsPerChild doesn't seem to be respected:
when it was set at 5 I could see in the logs at least 15 requests
served by the same pid.
The secondary server, though much less powerful and running exactly the
same software/library versions,
never shows this behavior. The only significant difference is the
kernel: 2.4.27 on the "sick" server (I can't replace
it, because of serious bugs in the raid driver that crash the server
very soon), 2.6.3-7 on the secondary.
Can anyone explain
1) why apache doesn't die after having reached the requests limit
2) why it takes 99% cpu?
3) what other (and better than mod_status/Apache::VMonitor) can I use to
see what's going on
on the server?
Thanks very much,
Nico