curl-library
Re: unexpected intermittent "couldn't connect to host" error
Date: Mon, 21 Apr 2008 12:45:29 -0700
I did a netstat -abn, and noticed that upto 127.0.0.1:5000 were used,
and 5000 is the default maximum for ephemeral ports in windows.
And given that the timewait before these ports are released is 4
minutes. I think that's what is causing my problems.
Do you have any recommendations on sniffers that have loopback support
for windows?
Thanks.
On Sun, Apr 20, 2008 at 7:14 PM, Dan Fandrich <dan_at_coneharvesters.com> wrote:
>
> On Sat, Apr 19, 2008 at 11:49:08PM -0700, Vijay Mani wrote:
> > I'm using the libcurl 7.18 (no ssl) for windows. We essentially
> > have a java server (running embedded jetty webserver) running on the
> > localhost. For each webrequest that we make we create a new handle
> > using curl_easy_init() and clean it up with curl_easy_cleanup. This
> > works , except sometimes when we're making requests in rapid
> > succession (sometimes in a matter of milli-seconds) we get a
> > "couldn't connect to host" error, and this lasts for requests made for
> > about 10 seconds.
> > We've verified that the webserver is indeed alive and running, and not
> > rejecting connections.
> >
> > Any ideas?
>
> It could be that you're running out of sockets on the client side--TCP
> sockets need to be kept around for a bit after closure. Does a packet
> sniffer shed any light on the possible cause?
>
> >>> Dan
> --
> http://www.MoveAnnouncer.com The web change of address service
> Let webmasters know that your web site has moved
>
Received on 2008-04-21