httplib hangs in read / strace says recvfrom()

Discussion in 'Python' started by Michael Bacarella, Sep 14, 2007.

  1. Hi list,

    I'm 99% sure httplib is sporadically hanging when I call read() on the
    HTTPResponse object (r.status == 200).

    Evidence:
    straceing the process shows it's blocked in recvfrom()
    ls -la /proc/pid/fd shows the socket-id for recvfrom() file
    descriptor (3)
    lsof -n | grep socket-id shows the connection to the HTTP server (on
    localhost:8080)
    tcpdump -s 10000 -XXX -i lo port 8080 shows a response IS coming
    over the wire

    This seems to be a common problem (according to the internets) but
    I haven't seen a resolution or explanation posted.

    I've tried httplib.py from Python 2.3 and also dropped in the one from
    Python 2.5 with no difference. Running on Linux kernel 2.6 (CentOS's,
    specifically).

    Any responses CC me as I'm not subscribed [since Python has worked so
    flawlessly for me otherwise <g>]

    --
    Michael Bacarella <>
    Director of Technology

    1-212-488-2222 (office)
    1-646-641-8662 (mobile)

    http://gpshopper.com/
    http://slifter.com/

    GPSHOPPER, LLC
    307 Seventh Avenue
    Suite 2104
    New York, NY 10001
     
    Michael Bacarella, Sep 14, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Michael Sgier

    Strace?

    Michael Sgier, Sep 13, 2004, in forum: C++
    Replies:
    1
    Views:
    488
    Victor Bazarov
    Sep 13, 2004
  2. keithb
    Replies:
    2
    Views:
    8,027
    keithb
    Jun 7, 2006
  3. Jack
    Replies:
    1
    Views:
    722
    Thomas J. Gritzan
    Feb 1, 2007
  4. Guru

    strace of fwrite

    Guru, Jul 1, 2010, in forum: C++
    Replies:
    0
    Views:
    264
  5. Joep van Delft

    strace of python shows nonsense

    Joep van Delft, Jan 14, 2013, in forum: Python
    Replies:
    2
    Views:
    142
    Dieter Maurer
    Jan 15, 2013
Loading...

Share This Page