View previous topic :: View next topic |
Author |
Message |
linkmark n00b
Joined: 15 Nov 2004 Posts: 36 Location: belgium
|
Posted: Tue Jun 27, 2006 12:46 pm Post subject: Apache procs creating abnormal high load |
|
|
Hi all.
I'm running an webserver for a small organization who rents webspace to people we know.
But the last few day's apache is acting very strange, there are some procs who are running each on the same cpu % load whyle the server should be almost idle. Resulting in constantly 100% load. I can't find the reason for this, searched google, this forum, ..
Here is what i get with top:
Code: | Tasks: 139 total, 7 running, 132 sleeping, 0 stopped, 0 zombie
Cpu(s): 100.0% us, 0.0% sy, 0.0% ni, 0.0% id, 0.0% wa, 0.0% hi, 0.0% si
Mem: 905736k total, 895328k used, 10408k free, 127776k buffers
Swap: 787176k total, 41076k used, 746100k free, 557824k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
29415 apache 25 0 101m 39m 3424 R 19.9 4.4 10:04.15 apache2
29424 apache 25 0 101m 39m 3424 R 19.9 4.4 13:38.45 apache2
29432 apache 25 0 125m 62m 3340 R 19.9 7.0 22:46.14 apache2
29454 apache 25 0 125m 62m 3340 R 19.9 7.0 30:28.91 apache2
29413 apache 25 0 125m 62m 3340 R 19.6 7.0 17:30.76 apache2
2228 root 16 0 1976 1108 828 R 0.3 0.1 0:00.02 top
1 root 16 0 1428 280 248 S 0.0 0.0 0:31.62 init
.. |
In the apache error log i find things like this:
Code: | [Thu Jun 15 08:24:38 2006] [error] [client 216.39.33.185] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): /w00tw00t.at.ISC.SANS.DFind:)
[Thu Jun 15 11:51:00 2006] [notice] SIGUSR1 received. Doing graceful restart
[Thu Jun 15 11:51:00 2006] [notice] Digest: generating secret for digest authentication ...
[Thu Jun 15 11:51:00 2006] [notice] Digest: done
[Thu Jun 15 11:51:01 2006] [notice] Apache configured -- resuming normal operations
[Thu Jun 15 11:51:01 2006] [notice] SIGUSR1 received. Doing graceful restart
[Thu Jun 15 11:51:01 2006] [notice] Digest: generating secret for digest authentication ...
[Thu Jun 15 11:51:01 2006] [notice] Digest: done
[Thu Jun 15 11:51:01 2006] [notice] Apache configured -- resuming normal operations
[Thu Jun 15 11:51:02 2006] [notice] SIGUSR1 received. Doing graceful restart
[Thu Jun 15 11:51:02 2006] [notice] Digest: generating secret for digest authentication ...
[Thu Jun 15 11:51:02 2006] [notice] Digest: done
[Thu Jun 15 11:51:03 2006] [notice] Apache configured -- resuming normal operations
[Thu Jun 15 11:51:03 2006] [notice] SIGUSR1 received. Doing graceful restart
[Thu Jun 15 11:51:03 2006] [notice] Digest: generating secret for digest authentication ...
[Thu Jun 15 11:51:03 2006] [notice] Digest: done
.. |
and (A LOT OF THESE, almost the whole log)
Code: | sh: /which: No such file or directory
sh: /which: No such file or directory
sh: /which: No such file or directory
sh: /which: No such file or directory
sh: /which: No such file or directory
sh: /which: No such file or directory
sh: /which: No such file or directory
sh: /which: No such file or directory
sh: /which: No such file or directory
sh: /which: No such file or directory
.. |
and
Code: | [Tue Jun 27 01:15:48 2006] [warn] child process 24124 still did not exit, sending a SIGTERM
[Tue Jun 27 01:15:48 2006] [warn] child process 24126 still did not exit, sending a SIGTERM
[Tue Jun 27 01:15:50 2006] [warn] child process 24124 still did not exit, sending a SIGTERM
[Tue Jun 27 01:15:50 2006] [warn] child process 24126 still did not exit, sending a SIGTERM
[Tue Jun 27 01:15:52 2006] [warn] child process 24124 still did not exit, sending a SIGTERM
[Tue Jun 27 01:15:52 2006] [warn] child process 24126 still did not exit, sending a SIGTERM
[Tue Jun 27 01:15:54 2006] [error] child process 24124 still did not exit, sending a SIGKILL
[Tue Jun 27 01:15:54 2006] [error] child process 24126 still did not exit, sending a SIGKILL
[Tue Jun 27 01:15:55 2006] [notice] caught SIGTERM, shutting down
[Tue Jun 27 01:16:12 2006] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec2)
[Tue Jun 27 01:16:13 2006] [notice] Digest: generating secret for digest authentication ...
[Tue Jun 27 01:16:13 2006] [notice] Digest: done
[Tue Jun 27 01:16:13 2006] [notice] Apache configured -- resuming normal operations
.. |
This last error messages ocure when i restart apache (what gives me no problem, the restarting). Afther the restart of apache, he run's smooth again for a whyle, until, for i don't know what reason yet, those loaded proc's are back.
Anyone has any idea? Would help me a lot.
Thanks in advanced!
linkmark |
|
Back to top |
|
|
celestialwizard Tux's lil' helper
Joined: 15 Jun 2006 Posts: 81 Location: Brisbane, Australia
|
Posted: Wed Jun 28, 2006 4:41 am Post subject: |
|
|
what version of apache are you running?
what are your virtual servers actually doing? (php? (4? 5?), phython?, perl?, java?, etc...)
why do you have suExec enabled? - disable it if possible, and if not possible, make it so. |
|
Back to top |
|
|
selig Guru
Joined: 31 Jul 2005 Posts: 425 Location: Prague, Czech Republic
|
Posted: Wed Jun 28, 2006 9:52 am Post subject: |
|
|
I guess I am having a similar problem. Apache runs fine, but every once in a few days, tons of apache processes become active and eat up the CPU. As a result of this, the load goes up to 60 or more and apache slows down to unusable levels, I have to stop it and start it again afterwards. I am using version 2.0.55-r1:
Code: |
net-www/apache-2.0.55-r1 USE="apache2 mpm-prefork ssl threads -debug -doc -ldap -mpm-leader -mpm-peruser -mpm-threadpool -mpm-worker -no-suexec -static-modules"
|
This is my setting from httpd.conf - maybe I should limit the MaxClients directive?:
Code: |
<IfModule prefork.c>
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 150
MaxRequestsPerChild 1200
</IfModule>
|
I run nothing special on it, just PHP with mod_php, but even serving static pages gets slow after that happens. Oh yes, the server gets 10 requests per second on average, so I am afraid lowering hte MaxClients directive significantly will cause decreased performance.
Last edited by selig on Wed Jun 28, 2006 2:55 pm; edited 1 time in total |
|
Back to top |
|
|
linkmark n00b
Joined: 15 Nov 2004 Posts: 36 Location: belgium
|
Posted: Wed Jun 28, 2006 2:16 pm Post subject: |
|
|
celestialwizard wrote: | what version of apache are you running?
what are your virtual servers actually doing? (php? (4? 5?), phython?, perl?, java?, etc...)
why do you have suExec enabled? - disable it if possible, and if not possible, make it so. |
My version: apache-2.0.55
The virtual hosts are created by Syscp ( http://www.syscp.de/ ) and each virtual hosts is an user account. The only thing that is enabled for these virtual hosts is PHP5 ( Version 5.1.1-gentoo )
Example
Code: | # Domain ID: 100 - CustomerID: 45 - CustomerLogin: dries
<VirtualHost 86.39.128.150>
ServerName chiromais.be
ServerAlias www.chiromais.be
ServerAdmin driesweckx@gmail.com
DocumentRoot /srv/www/users/dries/
php_admin_flag safe_mode On
ErrorLog /srv/www/logs/dries-error.log
CustomLog /srv/www/logs/dries-access.log combined |
suExec is disabled now, but this isn't the reason for the load right? |
|
Back to top |
|
|
celestialwizard Tux's lil' helper
Joined: 15 Jun 2006 Posts: 81 Location: Brisbane, Australia
|
Posted: Wed Jun 28, 2006 11:07 pm Post subject: |
|
|
To provide a quick look into what Apache is doing, enable service-status for a trusted requester and check it under normal load and under high load.
that should give you more of an idea of what process is running hot, who from, etc...
much easier than correlating logs and process output |
|
Back to top |
|
|
linkmark n00b
Joined: 15 Nov 2004 Posts: 36 Location: belgium
|
Posted: Sun Feb 11, 2007 3:42 pm Post subject: |
|
|
quite strange, the high load stopped itself .. without me doing something .. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|