cURL / Mailing Lists / curl-library / Single Mail

curl-library

libcurl connection "hands" in multi-threaded application

From: eli <netloc_at_gmail.com>
Date: Sat, 23 Jun 2012 17:57:03 +0200

Hello everybody,

There is one case where Google cant help me, because I don't know what to
search for. :-)

The setup is as follows... I have a multi-threaded application, where each
thread invokes a CURL connection to different remote host. Its an HTTP
connection and I control the timeouts and the connect-timeouts, e.q. I make
them finite. The application manages a thread pool, and lets assume that at
any given point of time 25 threads are active, which gives us 25 curl
connections.

After X minutes the application finishes processing the entire list (about
5000 URLs). However, usually 5-8 threads do not return because their CURL
connection "hangs". I tried to experiment how long this can take, and left
the house for 5 hours. When I returned it was still "hanging" - 5 hours is
long past the timeouts I set.

If I disconnect from the Internet, the threads return immediately. If I
repair the connection, they keep hanging.

Do you have any idea might cause such a behavior on Windows XP SP3?

Kind regards,

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-06-23