curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: Easy Reuse across Multiple Multi Handles

From: Daniel Stenberg via curl-library <curl-library_at_cool.haxx.se>
Date: Wed, 29 Jul 2020 00:29:16 +0200 (CEST)

On Tue, 28 Jul 2020, Damon Earp wrote:

> I finally got time to sit down and try to figure out what is happening. The
> issue goes away when I set CURLMOPT_MAXCONNECTS. Before I was just setting
> CURLMOPT_MAX_HOST_CONNECTIONS and most of my connections would live for a
> few milliseconds, once MAXCONNECTS is set my reuse and connection duration
> increases.

I read this several times but I didn't understand the conclusion nor the
metrics shown.

The default size of the connection pool when using the multi interface is
described in the CURLMOPT_MAXCONNECTS man page (4 times the number of added
easy handles basically). If you want a larger, you of course need to set that
option to something higher.

If you enable verbose mode, libcurl will tell when it re-uses connections for
transfers.

-- 
  / daniel.haxx.se | Commercial curl support up to 24x7 is available!
                   | Private help, bug fixes, support, ports, new features
                   | https://www.wolfssl.com/contact/
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2020-07-29