[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Delay between STOR command and 150 Connection response

The FTP protocol works by having one control channel where you send 
userid, password, put/get commands, etc.   And then it establishes a 
separate channel for each individual file transfer.

In standard ("active") FTP, the client (that's FTPAPI in this case) sends 
a PORT string to the server to tell the server which IP address and port 
number to connect to.  Then, it sends the STOR command to tell the server 
which file will be sent (STOR is the internal command used to implement a 
"get" request).  Immediately after the STOR, FTPAPI sits and waits for the 
server to send back a 150 response.

Upon receiving the STOR command, the server will attempt to connect to the 
IP address & port that was given in the preceding PORT command, and then 
will send the 150 response to let the client know that it's ready.

So -- the delay between the STOR and the 150 response, FTPAPI does 
nothing, but the server does this:

a) Verifies that the user has appropriate authority, and that the file 
name is legal.
b) Makes a connection back to the client.
c) Sends the 150 response.

As to why it takes this long?  Very hard to say...  could be packet loss. 
Could be a slow network connection.  Could be a bug in the server.  Could 
be an overworked server (trying to handle more connections than it has CPU 
power to process them)

Scott Klement  http://www.scottklement.com

On Tue, 16 Oct 2007, Evan Harris wrote:

> Hi there
> I have a customer who has been using the FTPAPI for some time now and
> have recently been experiencing a problem whereby FTP transfers are
> starting to backlog due to delays in the put operations completing.
> A sample transfer looks like this:
> 200 Type set to IMAGE.
>> PORT 10,1,32,1,51,88
> 200 command successful
>> STOR PO_699809.XML
> 150 Opening BINARY data connection for PO_699809.XML
> 226 transfer complete
> The job log message time sent on the STOR shows as 13:22:33 and the 150
> response shows as 13:22:48. The 226 reports a time of 13:22:49.
> What does the time delay between the STOR and the 150 response tell me ?
> Does it for example indicate that remote server is taking a little time
> to respond with the required information to complete the transfer (i.e.
> port etc) ?
> When running more or less the same code internally we don't see the same
> delay between the STOR command and the 150 response.
> I guess I'm wondering what actually happens between the STOR command the
> 150 so I can investigate what might be causing the delays I am seeing.
> Regards
> Evan Harris
This is the FTPAPI mailing list.  To unsubscribe, please go to: