cURL / Mailing Lists / curl-library / Single Mail


Re: Strange "couldn't connect to host" error

From: Jonathan Arnold <>
Date: Fri, 01 Jun 2007 09:28:59 -0400

Andre Guibert de Bruet wrote:
> On May 31, 2007, at 4:44 PM, Jonathan Arnold wrote:
>> Daniel Stenberg wrote:
>>> On Thu, 31 May 2007, Jonathan Arnold wrote:
>>>> We have a routine that gets called every second, goes out to the web,
>>>> and downloads a tiny (about 50 characters) file.
>>> What libcurl version? Does it download this from the same server
>>> every second?
>> curl, v7.16.2
>> Yes, it downloads from the same server.
>>>> It runs okay for some random time, say 30 minutes, but then returns
>>>> back a "Couldn't connect to host" error.
>>> That means that the connect() call failed...
>>>> Should I tweak some timeout?
>>> Possibly, yes. You should probably check what happens on the wire
>>> when this failure occurs to pinpoint exactly what to do.
>> I don't see anything via Wireshark when there is a problem. No packet
>> at all.
> Is the server closing the connection right before the call that is
> failing? Alternatively, would you happen to be calling curl functions
> using the same handle from multiple threads without adequate
> synchronization?

Not that I see in Wireshark. And the curl handle is local to the dialog
box that is using it.

Jonathan Arnold           Software Engineer
inSORS Integrated Communications, Inc Office/fax: 781.391.2818
Received on 2007-06-01