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: A single request in loop on macOS

From: Daniel Stenberg via curl-library <>
Date: Tue, 19 Mar 2024 23:41:59 +0100 (CET)

On Tue, 19 Mar 2024, Jicea via curl-library wrote:

> I launch the main 4 or 5 times in a row, one process at a time. Each time,
> I've error the 4rth or 5th times I launch `main`:

In your email snippet it stopped after about 5000*3+1370 (16370) rounds.

After 16,000 or so connections (within one or just a few seconds) it fails to
connect. To me, that indicates that a resource of some sort has run out, which
possibly makes curl fail to create the new socket.

Could it be ephemeral port exhaustion? macOS is said to have 16384 such ports
(49152 to 65535), and it can't reuse them immediately.

Linux seems to use a much wider range by default.

  | Commercial curl support up to 24x7 is available!
  | Private help, bug fixes, support, ports, new features
Received on 2024-03-19