You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by TubBiX <tu...@free.fr> on 2003/10/29 09:51:40 UTC
[users@httpd] Immortals httpd processes
Hello,
When i send a 'top' command, i can see that i have some immortals httpd
processes which are running.
These immortals processes made my server running really slowly ... it swaps a
lot. I can kill them, but do it every day would be really boring ...
How can i avoid this ?
I run php and mysql, can it be related to ?
My hosting company said that it's a software problem (means that my php script
do an infinite loop that made immortals http processes), but i don't change any
lines of my script until 3 months and this problem appear 1 month ago ...
Any idea / solutions ... ?
Thanks,
Matt
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Immortals httpd processes
Posted by TubBiX <tu...@free.fr>.
Robert Andersson <ro...@profundis.nu> wrote:
> TubBiX wrote:
> > When i send a 'top' command, i can see that i have some immortals httpd
> > processes which are running.
>
> "immortal" == zombie?
Immortals means they don't want to stop, i have 0 zombies
>
> > These immortals processes made my server running really slowly ... it
> > swaps a lot. I can kill them, but do it every day would be really boring
> ...
>
> They make it slow because they have gotten very fat through some memory
> consumption disorder, not CPU hogging?
>
> What processes are these? I guess that they are Apache's children just
> hanging around waiting for more requests to serve.
>
> If so, your main problem is likely memory leaks, most likely in PHP. The
> workaround would be to let Apache kill off a child when it has served a
> certain number of requests. Do this with the MaxRequestsPerChild directive,
> eg:
>
> MaxRequestsPerChild 100
>
> See:
> http://httpd.apache.org/docs-2.0/mod/mpm_common.html#maxrequestsperchild
>
> There are other things you can do as well, in order to keep the children
> becoming too fat over time and limiting how many of them there are, but this
> depends much on your setup and needs. Do some reading:
> http://httpd.apache.org/docs-2.0/misc/perf-tuning.html
>
> > My hosting company said that it's a software problem (means that my php
> > script do an infinite loop that made immortals http processes), but i
> don't
> > change any lines of my script until 3 months and this problem appear 1
> > month ago ...
>
> I'm still not sure what you mean by "immortal" children (as you *can* kill
> them), but I doubt that this is a script error. PHP is quite notorious for
> memory leaks, or so I've heard. Perhaps something changed in the server
> config one month ago.
>
> We'll need more information about your setup (OS, Apache version, config,
> memory, etc), and to see top's output could be useful as well.
>
> Regards,
> Robert Andersson
I run Debian 3.0, Apache 1.3.26, 512 Mo RAM, PHP 4.3.0, MySQL 3.23.53
Here is my top's output :
Immortals processes are not shown, but some httpd processes sometimes have time
values like 512:00 (that i mean 'immortals')
20071 apache 9 0 16224 14M 3284 S 13.1 6.7 0:00 httpd
16990 apache 10 0 17972 16M 10488 S 6.7 7.5 0:15 httpd
16816 apache 12 0 6820 5528 5380 S 3.7 2.4 0:11 httpd
20039 apache 15 0 14200 12M 3304 S 2.9 5.8 0:00 httpd
20072 mysql 10 0 13132 11M 11396 S 1.9 5.3 0:00 mysqld
19528 apache 11 0 16600 15M 12716 S 0.3 6.9 0:02 httpd
20066 tubbix 11 0 960 960 748 R 0.3 0.4 0:00 top
20048 apache 9 0 6508 5360 3304 S 0.1 2.4 0:00 httpd
20062 tubbix 9 0 1744 1708 1540 R 0.1 0.7 0:00 sshd
20065 apache 9 0 6308 5180 3288 S 0.1 2.3 0:00 httpd
20073 apache 9 0 3912 2304 2176 S 0.1 1.0 0:00 httpd
20074 apache 9 0 3912 2304 2176 S 0.1 1.0 0:00 httpd
1 root 8 0 280 240 240 S 0.0 0.1 0:07 init
2 root 9 0 0 0 0 SW 0.0 0.0 0:03 keventd
3 root 19 19 0 0 0 SWN 0.0 0.0 0:03 ksoftirqd_CPU0
4 root 9 0 0 0 0 SW 0.0 0.0 2:06 kswapd
5 root 9 0 0 0 0 SW 0.0 0.0 0:00 bdflush
6 root 9 0 0 0 0 SW 0.0 0.0 0:00 kupdated
7 root 9 0 0 0 0 SW 0.0 0.0 0:00 i2oevtd
43 root 9 0 0 0 0 SW 0.0 0.0 0:00 khubd
104 daemon 9 0 256 176 176 S 0.0 0.0 0:00 portmap
183 root 9 0 496 456 456 S 0.0 0.2 0:11 syslogd
186 root 9 0 952 212 212 S 0.0 0.0 0:00 klogd
189 root 9 0 1892 1648 1628 S 0.0 0.7 0:00 named
191 root 9 0 1892 1648 1628 S 0.0 0.7 0:00 named
192 root 9 0 1892 1648 1628 S 0.0 0.7 1:01 named
193 root 9 0 1892 1648 1628 S 0.0 0.7 0:00 named
194 root 9 0 1892 1648 1628 S 0.0 0.7 0:12 named
196 root 9 0 1040 572 552 S 0.0 0.2 0:00 lwresd
198 root 9 0 1040 572 552 S 0.0 0.2 0:00 lwresd
199 root 9 0 1040 572 552 S 0.0 0.2 0:00 lwresd
200 root 9 0 1040 572 552 S 0.0 0.2 0:00 lwresd
201 root 9 0 1040 572 552 S 0.0 0.2 0:00 lwresd
205 root 8 0 416 360 360 S 0.0 0.1 0:00 inetd
214 root 9 0 492 348 320 S 0.0 0.1 0:00 sshd
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Immortals httpd processes
Posted by Robert Andersson <ro...@profundis.nu>.
TubBiX wrote:
> When i send a 'top' command, i can see that i have some immortals httpd
> processes which are running.
"immortal" == zombie?
> These immortals processes made my server running really slowly ... it
> swaps a lot. I can kill them, but do it every day would be really boring
...
They make it slow because they have gotten very fat through some memory
consumption disorder, not CPU hogging?
What processes are these? I guess that they are Apache's children just
hanging around waiting for more requests to serve.
If so, your main problem is likely memory leaks, most likely in PHP. The
workaround would be to let Apache kill off a child when it has served a
certain number of requests. Do this with the MaxRequestsPerChild directive,
eg:
MaxRequestsPerChild 100
See:
http://httpd.apache.org/docs-2.0/mod/mpm_common.html#maxrequestsperchild
There are other things you can do as well, in order to keep the children
becoming too fat over time and limiting how many of them there are, but this
depends much on your setup and needs. Do some reading:
http://httpd.apache.org/docs-2.0/misc/perf-tuning.html
> My hosting company said that it's a software problem (means that my php
> script do an infinite loop that made immortals http processes), but i
don't
> change any lines of my script until 3 months and this problem appear 1
> month ago ...
I'm still not sure what you mean by "immortal" children (as you *can* kill
them), but I doubt that this is a script error. PHP is quite notorious for
memory leaks, or so I've heard. Perhaps something changed in the server
config one month ago.
We'll need more information about your setup (OS, Apache version, config,
memory, etc), and to see top's output could be useful as well.
Regards,
Robert Andersson
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org