[mod_python] remnant 'orphan' apache subprocesses

Graham Dumpleton graham.dumpleton at gmail.com
Tue Jan 22 00:22:00 EST 2008


What version of Apache are you using?

What Python web application are you running on top of mod_python, a
self built one or one that uses one of the larger web frameworks?

Does your application create sub processes in any way to perform
additional work?

Graham

On 22/01/2008, Alec Matusis <matusis at yahoo.com> wrote:
> I have been investigating a memory leak that occurs on  an apache server
> since we switched to worker MPM.
> I found that the source of it are apache subprocesses that lose track of
> their parent and never exit:
>
> root at web10 ~> ps -ef | grep httpd
> root     16197     1  0 02:00 ?        00:00:09
> /usr/local/encap/httpd/bin/httpd -f /p2/web/conf/web10.conf -k start
> nobody   17750     1  0 17:53 ?        00:00:00
> /usr/local/encap/httpd/bin/httpd -f /p2/web/conf/web10.conf -k start
> nobody    5112 16197  4 20:02 ?        00:00:16
> /usr/local/encap/httpd/bin/httpd -f /p2/web/conf/web10.conf -k start
> nobody    5159 16197  4 20:02 ?        00:00:15
> /usr/local/encap/httpd/bin/httpd -f /p2/web/conf/web10.conf -k start
> nobody    5300 16197  4 20:03 ?        00:00:14
> /usr/local/encap/httpd/bin/httpd -f /p2/web/conf/web10.conf -k start
>
>
> in this output, apache child pid 17750 has pid 1 as a parent, and it is one
> of those 'zombie children'.
> Pids 5112,  5159, 5300 were normal (parent is pid 16197), and they exited
> after MaxRequestsPerChild was reached.
>
> Does anybody have any advice on this? I cannot correlate this to anything,
> there's nothing interesting in the server error log.
> These 'zombies' appear at a rate of 2-3 per day; this apache serves about
> 350 requests per second.
>
> This Apache configuration is
>
> ServerLimit 40
> ThreadLimit 70
>
> StartServers 10
> MaxClients 1600
> MinSpareThreads 75
> MaxSpareThreads 200
> ThreadsPerChild 40
> MaxRequestsPerChild 10000
>
>
>
>
>
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python
>


More information about the Mod_python mailing list