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

curl-and-php

Re: Using CURLOPT_TIMEOUT_MS correctly?

From: Kevin Eppinger <ke7227_at_sbcglobal.net>
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 <daniel_at_haxx.se>
To: curl with PHP <curl-and-php_at_cool.haxx.se>
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
 bump
> it up to 1000 and everything is fine. Is anyone else seeing this
 behavior?

I think you're seeing this because your libcurl build uses a subsystem
 which
only allows full-second resolutions for timeout handling (when doing
 name
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
 sure...

-- 
  Commercial curl and libcurl Technical Support:
 http://haxx.se/curl.html
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2008-02-01