Message154549
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. |
|
Date |
User |
Action |
Args |
2012-02-28 11:43:00 | paul.moore | set | recipients:
+ paul.moore |
2012-02-28 11:43:00 | paul.moore | set | messageid: <1330429380.32.0.0524478586738.issue14148@psf.upfronthosting.co.za> |
2012-02-28 11:42:59 | paul.moore | link | issue14148 messages |
2012-02-28 11:42:59 | paul.moore | create | |
|