cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Mailing List Archives

Re: "Connection time-out" using curl multi interface with persistent connections

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 7 Jun 2010 16:53:44 +0200 (CEST)

On Mon, 7 Jun 2010, lali .cpp wrote:

> Yes, I am using timeouts. Here are the 2 scenarios I have tested(now on
> curlib version 7.20.1).

Timeouts with the multi interface is a known weakness. As the KNOWN_BUGS
document says:

62. CURLOPT_TIMEOUT does not work properly with the regular multi and
   multi_socket interfaces. The work-around for apps is to simply remove the
   easy handle once the time is up. See also:
   http://curl.haxx.se/bug/view.cgi?id=2501457

> Do curl_easy_setopt(curl_easy_handle, CURLOPT_CONNECT_TIMEOUT, 30) and
> curl_easy_setopt(curl_easy_handle, CURLOPT_TIMEOUT_MS, 75) for each of the
> easy handles i.e set a connection timeout of 30 millisecond and transfer
> timeout of 75 ms.

CURLOPT_CONNECTTIMEOUT is for seconds, CURLOPT_CONNECTTIMEOUT_MS is for
milliseconds. Even if I've not seen your particular problem before, I still
believe it is due to the general problems with timeouts in the multi
interface.

Of course I'd like to see this problem fixed at some point, but A) there's
nobody working on it afaik, and B) the work-around is not very painful.

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

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET