[New-bugs-announce] [issue10037] multiprocessing.pool processes started by worker handler stops working
report at bugs.python.org
Wed Oct 6 13:25:58 CEST 2010
New submission from Ask Solem <askh at opera.com>:
While working on an "autoscaling" (yes, people call it that...) feature for Celery, I noticed that the processes created by the _handle_workers thread doesn't always work. I have reproduced this in general, by just using the maxtasksperchild feature and letting the workers terminate themselves so this seems to have always been an issue (just not easy to reproduce unless workers are created with some frequency)
I'm not quite sure of the reason yet, but I finally managed to track it down to the workers being stuck while receiving from the queue.
The patch attached seems to resolve the issue by polling the queue before trying to receive.
I know this is short, I may have some more data later.
components: Library (Lib)
keywords: needs review, patch
stage: patch review
title: multiprocessing.pool processes started by worker handler stops working
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3
Added file: http://bugs.python.org/file19139/multiprocessing-worker-poll.patch
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce