cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: How long a connection is persisted if period of inactivity

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 18 Mar 2010 20:45:01 +0100 (CET)

On Thu, 18 Mar 2010, Pierre Morel wrote:

> However, if there is a period of inactivity (no call to easy_curl_perform or
> any curl function) of more than 15 seconds, then the request takes a lot
> longer (basically instead of an average 70ms, it's 350ms and as soon as the
> internet is slow, it increases from 300ms to 2-3seconds). Using tcpdump, it
> looks like in this case, curl does not reuse previous connections and
> perform all the initialisation

libcurl checks if the connection looks fine, and reuses it only then. If the
connection has already gone bad, it doesn't reuse it. That's totally
independent of time.

> I'm also calling curl_easy_reset(m_Curl); before each new transfer.

That's not necessary from libcurl's point of view.

> What could be the cause of this? How can I fix this?

First, see if you can repeat the problem with 7.20.0. If you can't: enjoy. If
you can: write up a small app that reproduces the problem and post it here!

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