[Yum-devel] urlgrabber socket timeouts
mstenner at linux.duke.edu
Wed Sep 29 05:42:43 UTC 2004
On Wed, Sep 29, 2004 at 01:08:34AM -0400, seth vidal wrote:
> Michael, Ryan,
> Have either of you looked into socket.gettimeout() and socket.
> settimeout() for urlgrabber calls?
> am I off in completely left field?
You're not in left field at all. The only issue is that this is only
available in 2.3. In previous versions, you'd need to include a third
On Wed, Sep 29, 2004 at 01:18:18AM -0400, seth vidal wrote:
> I did some VERY simple tests and it seems like
> import socket
> set's a timeout on all socket operations until it is unset.
> This could be something worth looking into for cleaning up connections
> where the connection or the server went away
I agree that this is a good way to go. It doesn't completely solve
timeout problems though because tcp timeouts won't always save you
from a stupid/slow server. A tcp timeout happens when one side sends
a request but doesn't get an acknowledgement. It's quite possible
(and common in ssh or imap connections) to simply have no requests
made for a very long time. In that case, you'd also need higher-level
timeouts, which I was looking into a couple weeks ago before I got
swamped in work.
In short, I'd have no problem implementing this as an "only >=2.3"
feature. However, we should probably be clear from the start that we
will eventually remove the checks, meaning: if you want to use new
urlgrabbers with old pythons for a long time, you should simply not
use this option.
ECE Department, the University of Arizona 520-626-1619
1230 E. Speedway Blvd., Tucson, AZ 85721-0104 ECE 524G
More information about the Yum-devel