cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: CURLMOPT_MAXCONNECTS

From: Patrick Scott <phanna_at_google.com>
Date: Fri, 30 Jan 2009 16:50:11 -0500

Well, I used curl_memdebug and the memory analyzer tool and it showed
a whole bunch of open file descriptors which I assume were left open
due to those dangling connections.

Where is that cleanup supposed to happen (I might not be doing
something properly in my app)? Ideally I would like the max connects
option to put a hard limit on the number of simultaneous connections
that curl can handle. Is there another option for that so
curl_multi_add_handle returns an error? Or can I call a function that
tells me how many connections are currently open?

Thanks,
Patrick

On Fri, Jan 30, 2009 at 4:30 PM, Daniel Stenberg <daniel_at_haxx.se> wrote:
> On Fri, 30 Jan 2009, Patrick Scott wrote:
>
> Please note that this is highly libcurl-specific questions and thus
> curl-library is rather the proper mailing list for this topic... That's
> where the other libcurl hackers hang out.
>
>> If I set the MAXCONNECTS option on a multi handle, what happens to the
>> extra connections that don't fit in the cache?
>
> They're just temporarily held outside of the cache while used, and then
> closed after the transfer is done since it doesn't fit the cache.
>
>> I've turned on logging to see things like "Connection #-1 left intact" but
>> where do those connections go?
>
> Unfortunately, those connection numbers in the verbose logs aren't fully
> consistent so their exact meaning isn't always easily conveyed like that...
>
>> Turning on leak checking appears to show those connections as leaks but
>> valgrind did not complain so I'm not sure who is correct. BTW, I'm using
>> libcurl 7.19.2 if that helps.
>
> I'm not aware of any such leaks in 7.19.2. And if valgrind doesn't yell, I
> doubt it truly is a leak... How exactly do you determine that? What's the
> "leak checking" you used?
>
> --
>
> / daniel.haxx.se
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
> FAQ: http://curl.haxx.se/docs/faq.html
> Etiquette: http://curl.haxx.se/mail/etiquette.html
>
-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2009-01-30