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 <curl-library_at_lists.haxx.se>
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.

-- 
  / daniel.haxx.se
  | Commercial curl support up to 24x7 is available!
  | Private help, bug fixes, support, ports, new features
  | https://curl.se/support.html
-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2024-03-19