how best to handle httplib timeouts ?
John J. Lee
jjl at pobox.com
Wed Jul 30 19:52:01 CEST 2003
"Rich" <rich at mchsi.com> writes:
> outage. The script I have so far connects to the server (using HTTPS) then
> passes a login request for a mailbox and retrieves the Inbox page. It does 5
> different requests in all and sometimes gets stuck on the third or fourth
> request. Running the source code version seems a little better than the one
> compiled with py2exe, and it will often return after what seems like a 2
> minute socket timeout. I've also tried playing with different settings for
> the default socket timeout value but that doesn't seem to help either. (I'm
> running 2.3b2)
1. Get 2.3final (I don't know whether there was a bug fix, but I have
a vague recollection there was some sort of problem with timeouts
-- see the python-dev summaries and/or SF bug archive).
2. Check with a tool like ethereal to see exactly where it's getting
stuck. If it's DNS, maybe you can do the name lookup(s) once, then
just use the IP address for subsequent requests. If not, at least
you'll know where the problem is.
More information about the Python-list