Bug 50466 - httpd process doesn't recycle
Summary: httpd process doesn't recycle
Status: RESOLVED LATER
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mpm_prefork (show other bugs)
Version: 2.2.15
Hardware: Other Linux
: P2 major (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords: MassUpdate
Depends on:
Blocks:
 
Reported: 2010-12-13 10:08 UTC by cheungtitus
Modified: 2018-11-07 21:08 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description cheungtitus 2010-12-13 10:08:24 UTC
There appears to be an issue with Apache web server not being able to recycle one of the httpd processes.  It appears to be stuck and consumed 100% CPU power.  This is happening despite the following settings as appeared on my phpinfo() page.
Max Requests 	Per Child: 10000 - Keep Alive: on - Max Per Connection: 100 


To illustrate this, please look at PID 4188 from the following 2 "top" capture over a span of 3 days.  Any additional details required please let me know.  This is running on CentOS 5.5 64-bit 2.6.18-194.el5.


1 day later
top - 08:11:06 up 122 days, 11:05, 1 user, load average: 1.05, 1.04, 0.97
Tasks: 135 total, 3 running, 132 sleeping, 0 stopped, 0 zombie
Cpu0 : 5.7%us, 0.7%sy, 0.0%ni, 90.7%id, 1.7%wa, 0.7%hi, 0.7%si, 0.0%st
Cpu1 : 73.4%us, 26.6%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 2059516k total, 1906896k used, 152620k free, 154016k buffers
Swap: 4095992k total, 80k used, 4095912k free, 1005564k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
4188 daemon 25 0 115m 18m 2948 R 100.2 0.9 43:25.32 httpd
6602 daemon 15 0 109m 12m 2856 S 2.7 0.6 0:00.17 httpd
6678 daemon 15 0 105m 8416 2600 S 1.3 0.4 0:00.05 httpd



3 days later
top - 06:16:14 up 124 days,  9:10,  1 user,  load average: 1.03, 1.20, 1.18
Tasks: 128 total,   3 running, 125 sleeping,   0 stopped,   0 zombie
Cpu0  : 12.3%us,  1.3%sy,  0.0%ni, 85.3%id,  0.0%wa,  0.3%hi,  0.7%si,  0.0%st
Cpu1  : 73.8%us, 26.2%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   2059516k total,  1923432k used,   136084k free,   157940k buffers
Swap:  4095992k total,       80k used,  4095912k free,   986552k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 4188 daemon    25   0  115m  18m 2948 R 99.9  0.9   2806:08 httpd
  645 daemon    15   0  108m  10m 2852 S  4.7  0.5   0:00.15 httpd
  550 daemon    15   0  109m  12m 2868 S  2.7  0.6   0:00.56 httpd
  632 daemon    15   0  108m  11m 2836 S  2.7  0.6   0:00.15 httpd
  633 daemon    15   0  109m  11m 2832 S  2.0  0.6   0:00.19 httpd
  647 daemon    16   0  106m 8860 2740 S  1.7  0.4   0:00.05 httpd
  476 daemon    16   0  108m  11m 2932 S  0.7  0.6   0:01.63 httpd
Comment 1 Eric Covener 2010-12-13 11:19:03 UTC
processes don't exit until they're done processing all requests they've accepted. 

If a process is looping, it will never have a chance to exit. Where does a backtrace of the process say it's looping?
Comment 2 cheungtitus 2010-12-14 11:10:27 UTC
(In reply to comment #1)
> processes don't exit until they're done processing all requests they've
> accepted. 
> 
> If a process is looping, it will never have a chance to exit. Where does a
> backtrace of the process say it's looping?

Sorry how can I do a back trace when this happens again?  Is there any log where I can find this information?
Comment 3 cheungtitus 2010-12-19 10:31:41 UTC
Hi, this just happened again today, since a restart was done about a week ago.  The same symptoms occurred.  Any idea if I can turn on more logging to see what a specific httpd process is doing?
Comment 4 Stefan Fritsch 2010-12-19 16:14:23 UTC
gdb -p 4188 (or whatever the pid of the looping process is)
bt full

To be really useful, you would need the debugging symbols installed (don't know how that works under centos).

Maybe http://httpd.apache.org/dev/debugging.html helps.
Comment 5 William A. Rowe Jr. 2018-11-07 21:08:23 UTC
Please help us to refine our list of open and current defects; this is a mass update of old and inactive Bugzilla reports which reflect user error, already resolved defects, and still-existing defects in httpd.

As repeatedly announced, the Apache HTTP Server Project has discontinued all development and patch review of the 2.2.x series of releases. The final release 2.2.34 was published in July 2017, and no further evaluation of bug reports or security risks will be considered or published for 2.2.x releases. All reports older than 2.4.x have been updated to status RESOLVED/LATER; no further action is expected unless the report still applies to a current version of httpd.

If your report represented a question or confusion about how to use an httpd feature, an unexpected server behavior, problems building or installing httpd, or working with an external component (a third party module, browser etc.) we ask you to start by bringing your question to the User Support and Discussion mailing list, see [https://httpd.apache.org/lists.html#http-users] for details. Include a link to this Bugzilla report for completeness with your question.

If your report was clearly a defect in httpd or a feature request, we ask that you retest using a modern httpd release (2.4.33 or later) released in the past year. If it can be reproduced, please reopen this bug and change the Version field above to the httpd version you have reconfirmed with.

Your help in identifying defects or enhancements still applicable to the current httpd server software release is greatly appreciated.