cURL / Mailing Lists / curl-library / Single Mail

curl-library

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

From: lali .cpp <lali.cpp_at_gmail.com>
Date: Mon, 7 Jun 2010 19:52:53 +0530

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

Scenario 1:-
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. Add these easy handles to multi handle. Then in
*select*set timeout as 75 millisecond and I get lots of "Connection
time-out" and
very little "Re-using connection"

Scenario 2:
Do curl_easy_setopt(curl_easy_handle, CURLOPT_CONNECT_TIMEOUT, 30) for each
of the easy handles i.e set a connection timeout of 30 millisecond . Add
these easy handles to multi handle. Then in *select* set timeout as 75
millisecond and I get lots of "Connection seems to be dead" and very little
"Re-using connection"

The servers to which I am connecting have very small latency i.e < 1
millisecond.
Am I doing something wrong?

Regards
lali

On 7 June 2010 17:21, Daniel Stenberg <daniel_at_haxx.se> wrote:

> On Mon, 7 Jun 2010, lali .cpp wrote:
>
> * Connection time-out
>>
>
> This implies that you have a set timeout on the easy handles, do you? I
> grepped the source for "Connection time-out" and I can only see occurances
> that happen due to reaching such a timeout. I figure that can then possibly
> be due to a problem with setting the start time or similar for the multi
> interface.
>
>
> Libcurl version used is 7.19.0.
>>
>
> I think it would make sense to try with the latest version first to see if
> this still is a problem there, then we can try to pinpoint further to figure
> exactly why it happens.
>
> --
>
> / daniel.haxx.se
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette: http://curl.haxx.se/mail/etiquette.html
>

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