cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: FTP Upload Large file give CURLE_OPERATION_TIMEDOUT error

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 21 Sep 2010 17:00:11 +0200 (CEST)

On Tue, 21 Sep 2010, Thomas Chavanis wrote:

> I try to implement what Daniel Stenberg explain on his blog, on the subject
> "Curl keeps connections alive" http://daniel.haxx.se/blog/2007/12/
>
> But it didn't resolve my problem.

...

> returnValue = setsockopt(curlfd, SOL_SOCKET, SO_KEEPALIVE,
> &activateOption, sizeof(int));

This only enables keep-alive with the default timeout. That may very well be
(far) too long to make any difference to you.

In Linux, you can also set TCP_KEEPIDLE and TCP_KEEPINTVL to alter the
behavior on a per-connection basis, but it seems that in MacOS X you need to
instead use sysctl and change these globally. As described at
http://www.gnugk.org/keepalive.html

At least I couldn't find any other ways.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2010-09-21