cURL / Mailing Lists / curl-library / Single Mail

curl-library

libcurl - No timeout

From: Roland Krikava <list-subs_at_bluedigits.com>
Date: Fri, 16 Jul 2004 21:52:54 -0400

Hi,

I'm using libcurl to get data via https get on an interval basis. I sometimes find the threads, that perform the interval https gets, hanging. They are hanging in the select within the Transfer while loop. This prompted me to look into setting a timeout value and found CURLOPT_TIMEOUT. This however will timeout on the time connected, and not on the time it takes for the server to respond (killing off legitimate connections).

In trying to replicate this I wrote the following cgi script:

#!/bin/bash
echo "Content-Type: text/html"
echo "Content-Length: 5"
echo
while [ 1 ]
do
val=1;
done

The connection will however timeout after a few minutes.

Any suggestions on how to troubleshoot this, and avoid setting timeouts that kill legitimate connections?

Note: I'm using libcurl 7.12.0 for win32

Thanks,
Roland
Received on 2004-07-17