cURL / Mailing Lists / curl-library / Single Mail

curl-library

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

From: Andre Guibert de Bruet <andy_at_siliconlandmark.com>
Date: Thu, 31 May 2007 17:26:10 -0400

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?

Cheers,

/* Andre Guibert de Bruet * 6f43 6564 7020 656f 2e74 4220 7469 6a20 */
/* Code poet / Sysadmin * 636f 656b 2e79 5320 7379 6461 696d 2e6e */
/* GSM: +1 734 846 8758 * 5520 494e 2058 6c73 7565 6874 002e 0000 */
/* WWW: siliconlandmark.com * C/C++, Java, Perl, PHP, SQL, XHTML, XML */
Received on 2007-05-31