Author bgilbert
Recipients bgilbert
Date 2011-10-18.19:16:55
SpamBayes Score 3.33728e-05
Marked as misclassified No
Message-id <1318965417.81.0.122561387998.issue13215@psf.upfronthosting.co.za>
In-reply-to
Content
multiprocessing.managers.BaseManager.connect() takes 20 seconds to return on failure, even if the server refuses the connection.  This is because the function that creates the connection, multiprocessing.connection.SocketClient(), handles ECONNREFUSED by retrying the connection attempt every 10 ms for 20 seconds.

While a 20 second timeout may make sense for *unresponsive* servers, ECONNREFUSED probably indicates that the server is not listening on this port, so hammering it with 1,999 more connection attempts isn't going to help.  In this case, SocketClient() should fail immediately, or -- at most -- retry a small number of times with exponential backoff.
History
Date User Action Args
2011-10-18 19:16:57bgilbertsetrecipients: + bgilbert
2011-10-18 19:16:57bgilbertsetmessageid: <1318965417.81.0.122561387998.issue13215@psf.upfronthosting.co.za>
2011-10-18 19:16:57bgilbertlinkissue13215 messages
2011-10-18 19:16:55bgilbertcreate