This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author paul.moore
Recipients paul.moore
Date 2012-02-28.11:42:59
SpamBayes Score 9.6519734e-08
Marked as misclassified No
Message-id <1330429380.32.0.0524478586738.issue14148@psf.upfronthosting.co.za>
In-reply-to
Content
I have an application which fires off a number of database connections via a multiprocessing pool. Unfortunately, the database software occasionally gets "stuck" and a connection request hangs indefinitely. This locks up the whole process doing the connection, and cannot be interrupted except by killing the process.

It would be useful to have a facility to restart "stuck" workers in this case.

As an interface, I would suggest an additional argument to the AsyncResult.get method, kill_on_timeout. If this argument is true, and the get times out, the worker servicing the result will be killed and restarted.

Alternatively, provide a method on an AsyncResult to access the worker process that is servicing the request. I could then wait on the result and kill the worker manually if it does not respond in time.

Without a facility like this, there is a potential for the pool to get starved of workers if multiple connections hang.
History
Date User Action Args
2012-02-28 11:43:00paul.mooresetrecipients: + paul.moore
2012-02-28 11:43:00paul.mooresetmessageid: <1330429380.32.0.0524478586738.issue14148@psf.upfronthosting.co.za>
2012-02-28 11:42:59paul.moorelinkissue14148 messages
2012-02-28 11:42:59paul.moorecreate