New submission from Ask Solem <a...@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 <rep...@bugs.python.org>
<http://bugs.python.org/issue10037>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to