cURL / Mailing Lists / curl-and-php / Single Mail


Re: Using CURLOPT_TIMEOUT_MS correctly?

From: Kevin Eppinger <>
Date: Fri, 1 Feb 2008 12:18:52 -0800 (PST)

UPDATE: I recompiled cURL with -enable-ares configured and also added the use of CURLOPT_NOSIGNAL and it appears to now be applying the timeouts correctly.

----- Original Message ----
From: Daniel Stenberg <>
To: curl with PHP <>
Sent: Wednesday, January 30, 2008 1:43:35 PM
Subject: Re: Using CURLOPT_TIMEOUT_MS correctly?

On Wed, 30 Jan 2008, Kevin Eppinger wrote:

> This ALWAYS returns errno 28 (Timeout was reached) for ANY URL that
> I try. The only way I can get it to work is if I set the MS timeout
> value >= 1000. I can set it to 999 and it immediately fails, but
> it up to 1000 and everything is fine. Is anyone else seeing this

I think you're seeing this because your libcurl build uses a subsystem
only allows full-second resolutions for timeout handling (when doing
resolves) so when you use a host name that isn't resolved instantly the
timeout will trigger.

Of course I can be wrong. Reading up on the source code would tell for

  Commercial curl and libcurl Technical Support:
Received on 2008-02-01