[New-bugs-announce] [issue11109] socketserver.ForkingMixIn leaves zombies
report at bugs.python.org
Thu Feb 3 23:01:14 CET 2011
New submission from Justin <justin.warkentin at gmail.com>:
This is the same issue as was reported here: http://bugs.python.org/issue1954. It is still a problem in Python 3.1. I'm writing a server that will be receiving a massive number of requests and I'd like to eliminate the zombie problem. Once I figured out what was going on, I tried adding a call to collect_children() in the serve_forever() loop. It worked very well. I've included a patch of what I did, however, I obviously can't leave this change in my socketserver.py because we will be deploying this on a lot of servers.
Is there any reason not to collect_children() in the serve_forever() loop? It seems like the place to do it to me. The patch will only collect children if there are any, so it doesn't have to call it every time through the loop.
components: Library (Lib)
title: socketserver.ForkingMixIn leaves zombies
versions: Python 3.1
Added file: http://bugs.python.org/file20665/collect_children.patch
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce