cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Persistent HTTPS connections

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 23 Jan 2007 22:41:45 +0100 (CET)

On Tue, 23 Jan 2007, Andreas Rieke wrote:

> please find attached to this email a tcpdump in both ascii and binary format
> showing cURL communicating with an apache web server. The first port cURL
> uses on the client site is 52713, and after data is transferred, the
> connection is not closed and thus keeps alive. So far, so good. However, a
> new connection is established for the next request at 21:35:48.966017 from
> port 52714 to the same destination and so on until all connections from
> cURL's pool are open to that web server. This is where I do not understand
> why cURL does not reuse the first connection with port 52713.

I don't think the tcpdumps help much (and they are very hard to read). I think
you're better way off spending time by:

  1 - figure out why ConnectionExists() doesn't detect and re-use your alive
      connection

  2 - show us your code, or at least a small piece of code, that we can use to
      repeat this problem with to aid debugging

> When cURL has no unused connections left, it tries to reuse the the first
> one (52713 at 21:36:07.017156)

There's no code in libcurl that would do such a thing. There's clearly
something with your description that I don't understand.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2007-01-23