cURL / Mailing Lists / curl-library / Single Mail


Re: FTP response timeout

From: Dan Fandrich <>
Date: Thu, 28 Jun 2012 00:14:36 +0200

On Wed, Jun 27, 2012 at 02:16:14PM -0700, Jeff McKay wrote:
> I have seen an earlier response to the question of what error #28 in
> ftp means
> but didn't quite understand it. Looking at the log of my ftp
> session, it appears
> that libcurl uploads the entire file (about 350 megs) based on the
> data fetches
> received. At the end, I get "FTP response timeout, control
> connection looks dead".
> This does not seem to happen with smaller files. Is this my problem,
> or with the
> ftp server? If my problem, what can I do about it?

It sounds like the connection is going through a stateful router or NAT
and the control connection times out due to inactivity and is closed by the
router. You can try the --keepalive-time option (if it's supported on
your platform) to force periodic traffic on the control channel to keep
the connection alive.

> I am experimenting with CURLOPT_FTP_RESPONSE_TIMEOUT but have not gotten
> the results yet from my customer. From the documentation, it seems
> that without
> this option, libcurl defaults to CURLOPT_TIMEOUT which I do not set,
> therefore
> the wait is infinite? But I still get the ftp timeout error.

libcurl uses a hard-coded 60 second timeout for getting the
response after a ftp transfer. I'm not sure why this doesn't use

>>> Dan
List admin:
Received on 2012-06-28