curl-library
Re: curl_easy_perform connection termination scenario
Date: Thu, 10 Mar 2011 17:59:33 -0800
On Thu, Mar 10, 2011 at 06:56:06PM -0500, Pankaj Takawale wrote:
> I noticed following behaviour of curl_easy_perform when server
> terminates connection after sending response to curl client.
>
> Case1: curl_easy_perform returns immediately, and detects broken
> connection at the time of next request.
> It then re-establishes the connection and retrieve page successfully.
> Whole process takes around 220ms (200ms for TCP connection + SSL
> Handshake, 8 ms for http response)
>
> Case2: curl_easy_perform is taking around 900ms to sec to return.
> In this case too, I see server returned response followed by TCP FIN
> immediately.
> All termination packet flow is same as of case1.
> Still curl_easy_perform is taking 800ms further to return.
>
> Please advice any work around to deal with this.
What platform and libcurl version are you using? The TCP logs don't
show any 900 msec delays, so it would be useful to see an instrumented
libcurl log for the delay case. How often does the delay case happen?
How do you know it isn't simply due to other higher-priority processes
on the system preempting the libcurl-using process for that extra time?
>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-03-11