cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Regarding the curl_easy_perform error.

From: partha koley <query2partha_at_gmail.com>
Date: Thu, 9 Apr 2009 20:53:34 -0400

HI,
Even I faced a similar issue. I don't see any failed TCP connect sequence in
wireshark and the web server is up and running fine.
I guess RTOS is running out of available TCP sockets due to which new HTTP
requests are not being sent out and only after 5-6 seconds everything starts
working fine.
So can we set TIME_WAIT to zero in libcurl and what is the default value
that is already set if any?
Can we control that through lib curl so that the socket does not go into
WAIT state?

On Thu, Apr 9, 2009 at 5:40 PM, Daniel Stenberg <daniel_at_haxx.se> wrote:

> On Thu, 9 Apr 2009, Pallavi Agrawal wrote:
>
> I am facing the issue of the curl_easy_perform error "couldn't connect to
>> host" on making rapid web requests.
>>
>
> if you wireshark the network when this happens, don't you see failed TCP
> "connect" sequences? Or is it socket() that fails?
>
> On getting the libcurl error I did inetstatShow and observerd that the tcp
>> sockets get into the TIME_WAIT (as can be seen below).
>>
>
> If they are, I suppose an RTOS could easily run out of available sockets.
> Why are they in TIME_WAIT? Normally they shouldn't be.
>
> --
>
> / daniel.haxx.se
>
Received on 2009-04-10