Re: Couldn't connect to host (err: 7)
Date: Sun, 20 Sep 2020 23:29:16 +0200 (CEST)
On Sun, 20 Sep 2020, Hadi Rezaee via curl-library wrote:
> Still we're not sure what is bottle-neck here. Is it client+libcurl or
> webserver or even machine.
There's just not enough details for us to tell.
If you keep doing requests against the same machine very frequently, why does
it create new connections at all, shouldn't they all reuse the connection?
You say 700 requests per second, but why do you use one thousand handles for
that? You should be able to use a single one.
CURLE_COULDNT_CONNECT means that the TCP handshake failed (connect() failure
typically). It *usually* implies that the server didn't accept it, but it can
also be due to resource problems client side. If you use a thousand handles
within the same process, you can probably run into a too many open sockets
problem.
-- / 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.htmlReceived on 2020-09-20