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: libcurl and TCP connection setup rate control

From: Daniel Stenberg via curl-library <>
Date: Fri, 30 Sep 2022 16:54:46 +0200 (CEST)

On Fri, 30 Sep 2022, gerwsx via curl-library wrote:

> Does anyone know if there is a way to control the TCP connection setup rate?
> When there are a lot of requests to be sent, libcurl keeps opening TCP
> connections with a very high rate, for example:

I presume you are adding a lot of easy handles to a multi handle? curl will
then act on them as fast as possible.

Things you can do:

1. add them in a slower pace so that the previous transfers get time to start.
    You do not HAVE TO add all the handles at the same time.

2. limit the number of connections per host name you allow curl to use

3. if they use HTTP/2 and could multiplex, consider using CURLOPT_PIPEWAIT to
    make subsequent transfers prefer to pipeline rather than creating a new

  | Commercial curl support up to 24x7 is available!
  | Private help, bug fixes, support, ports, new features
Received on 2022-09-30