[Sussex] FC4 - FTP timeout
Steven Dobson
Steve at Dobson.org
Mon Sep 25 13:12:52 UTC 2006
Brendan
On Mon, 2006-09-25 at 13:48 +0100, Brendan Whelan wrote:
> More information on intermittent FTP problem - in the message log there are
> lots of "FTP session opened" and "FTP session closed" messages but some odd
> errors e.g.
<snip>
> This pattern matches what is reported i.e. sometimes the FTP works but other
> times it doesn't.
>
> I have looked in ProFTPD (for the first time) and see that max instances is
> set to 20 - should I increase the value? Is there anything else I need to
> change?
I don't know proFTPD but I did have a thought that it might be a timing
thing.
FTP is not an atomic operation. It can take a number of packets to
transfer the data. You can see this happening by just running repeated
"ls -l" on the incoming directory and see the file size grow.
My thought was: how does your receiving software know that the FTP
transfere is complete? For example, if it is a cron task that runs
every minute looking for new files in the up load directory, how does it
know that the new file it sees is complete and not part way thought the
upload?
One common way is to upload to a scratch directory and then use the FTP
rename (from the client) to move the file to a different directory. So
long as the scratch directory and the target directory are both on the
same file system then the rename IS an atomic operation. The file
appears complete in the target directory as soon as it is renamed by the
OS.
Just a thought. Hope it helps.
Steve
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://mailman.lug.org.uk/pipermail/sussex/attachments/20060925/2b565eef/attachment.pgp
More information about the Sussex
mailing list