Help with Threads and httplib please

Aahz Maruch aahz at netcom.com
Tue Aug 17 15:46:16 EDT 1999


In article <37B9A587.3160428E at platonix.com>,
Yishai Beeri  <yishai at platonix.com> wrote:
>
>I have a weird problem running several python threads that use httplib
>to get some pages from the web. all runs ok, until suddenly all the
>threads get stuck. A ctrl-c makes them all continue, until the next time
>they're stuck again.
>
>From what I saw in the debugger, it seems that one thread is stuck in
>the "connect" of the socket under httplib, and all the other threads are
>waiting for some reason.

We're having similar problems in a slightly different context.  I don't
have a complete answer yet, but part of the problem has to do with not
setting up the socket with a timeout.  Another part seems to be with
using blocking mode.

One thing we've definitely noticed is that if the server terminates the
socket *after* starting to send information but *before* all info has
been transmitted, the client will hang.
--
                      --- Aahz (@netcom.com)

Androgynous poly kinky vanilla queer het    <*>      http://www.rahul.net/aahz/
Hugs and backrubs -- I break Rule 6  (if you want to know, do some research)




More information about the Python-list mailing list