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: Jicea via curl-library <curl-library_at_lists.haxx.se>
Date: Wed, 20 Mar 2024 16:01:25 +0000

Thanks Daniel,

That may be a good explanation why error are happening around at the same request. I struggled to see what can explain the errors to be so “consistent”!

I will dig further into the port exhaustion explanation,

Thanks



Orange Restricted

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tuesday, 19 March 2024 at 23:42
To: Jicea via curl-library <curl-library_at_lists.haxx.se>
Cc: AMIEL Jean-Christophe DTSI/SI <jeanchristophe.amiel_at_orange.com>
Subject: Re: A single request in loop on macOS
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://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcurl.se%2Fsupport.html&data=05%7C02%7Cjeanchristophe.amiel%40orange.com%7C802266afd0c44ab3907a08dc4865cbdb%7C90c7a20af34b40bfbc48b9253b6f5d20%7C0%7C0%7C638464849245661122%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=paVvaiYM94nO8zTCwhJeRPP%2FkHTUbK%2BB6ZgDFwPVnW0%3D&reserved=0<https://curl.se/support.html>
____________________________________________________________________________________________________________
Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.
This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.
Thank you.


-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2024-03-20