[New-bugs-announce] [issue10037] multiprocessing.pool processes started by worker handler stops working

Ask Solem 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)
files: multiprocessing-worker-poll.patch
keywords: needs review, patch
messages: 118062
nosy: asksol
priority: critical
severity: normal
stage: patch review
status: open
title: multiprocessing.pool processes started by worker handler stops working
type: behavior
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>
<http://bugs.python.org/issue10037>
_______________________________________


More information about the New-bugs-announce mailing list