PDA

View Full Version : List timeout


Yil
04-16-2011, 08:46 AM
I see a note for v4.0.0.1511 - Fixed application lock up when listing a directory. Is that a 30 second timeout that closes the control connection?

I was doing some stress testing on ioFTPD and using large recursive directory listings and for some reason I kept loosing the connection and I was looking all over my code until I got the idea that something changed in Flash.

My first argument would be why close the control connection? I could see it making sense for stat commands, but list? Hmm, I could see an argument for the control if some people really need that with some FTP servers, but only if processing a queue but not interactive usage where the user can just manually disconnect/reconnect if needed. Second, it probably shouldn't close anything unless the user has hit the X cancel button or the "no data transferred" timeout has been hit because that can be set larger...

There are lots of cases for listings taking more than 30 seconds. Heck, ioFTPD can hit the 2 minute hard command timeout on some sites if it has just started and has no dirs cached. In my test case this was a large 10MB recursive directory listing (which FlashFXP v4 handles much faster btw) so it was actively sending data when aborted so I don't think that should be considered dead at least.

Oh, and while I'm at it, how about an option to set the command timeout? 2 minutes is just too slow for some things. Lots of scripts, etc can take 5-10 minutes to run and while most have been modified to output status every minute or so it would be nice to be able to set the timeout to something larger. How about applying the larger of the "no data transferred" timeout and 2 minutes if it's difficult to add a new field to the GUI?

bigstar
04-16-2011, 01:14 PM
The connection timeout value in the Preferences dialog will override the 2 minute command limit if larger than 2 minutes.

I don't think there should be any 30 second timeout, unless maybe its using your connect timeout?

I have no problem bumping up the command timeout. The main reason for having the timeout is to detect a lost of connection that may have occurred without being notified.

The list lockup was unrelated to any timeout values.

Yil
04-16-2011, 02:14 PM
Something changed then... Here's some results from a local test server I'm beating to death:

v4.0.0.1525:
[14:54:34] [R] LIST -alR
[14:54:34] [R] Connected. Negotiating SSL session
[14:54:35] [R] 150 Opening ASCII mode data connection for directory listing using SSL/TLS.
[14:54:35] [R] TLSv1 negotiation successful...
[14:54:35] [R] TLSv1 encrypted session using cipher ECDHE-RSA-AES256-SHA (256 bits)
[14:55:05] [R] Connection lost: xyz - Admin - Localhost

4.0.0.1503:
[15:02:02] [R] LIST -alR
[15:02:02] [R] Connected. Negotiating TLSv1 session
[15:02:03] [R] 150 Opening ASCII mode data connection for directory listing using SSL/TLS.
[15:02:03] [R] TLSv1 negotiation successful...
[15:02:03] [R] TLSv1 encrypted session using cipher ECDHE-RSA-AES256-SHA (256 bits)
[15:03:03] [R] Connection lost: ioFTPD - local
[15:03:03] [R] List Complete: 2.93 MB in 1 minute 1 second (48.7 KB/s)

3.7.9.1401:
[15:03:07] [R] LIST -alR
[15:03:07] [R] Connected. Negotiating TLSv1 session
[15:03:08] [R] 150 Opening ASCII mode data connection for directory listing using SSL/TLS.
[15:03:08] [R] TLSv1 negotiation successful...
[15:03:08] [R] TLSv1 encrypted session using cipher DHE-RSA-AES256-SHA (256 bits)
[15:05:47] [R] Connection lost: xyz - Admin


2 minutes back in 1401, 1 minute at 1503, 30 seconds at 1525. I didn't re-test 1401 but the others are repeatable and because they all differ it isn't an ioFTPD timeout...

I'm not sure what you meant by 'The connection timeout value in the Preferences dialog will override the 2 minute command limit if larger than 2 minutes'. I'm talking about raising the command timeout so you can do things like 'site wipe' or 'site search' or 'site rescan' and not get the control connection broken in 2 minutes if no response has been sent from the server. I like no timeout if interactive, but otherwise using the 'no data transmitted' option seems like it would make sense, especially since it's adjustable, even though it's currently applied only to data channel transfers.

Update: just to be clear. The listing should be over 10MB in length so b1503 didn't complete, but it might have thought it did because it displayed results in the listing window whereas the other 2 didn't show anything...

bigstar
04-16-2011, 05:47 PM
There shouldn't be any problems doing a LIST -laR, as long as the client is receiving data from the server the command time limit is reset.

But I understand what you mean by doing commands such as SITE WIPE

What I was referring to is that the connection timeout value in the preferences will override the 2min command timeout if the value is larger than 2min.

Yil
04-16-2011, 11:36 PM
Could you verify that directory listings die after like 30 seconds in v4 final or does that work for you? Maybe a list -alR at like ftp.uu.net or something. From the times in my previous message you can see it doesn't for me.

bigstar
04-17-2011, 02:29 PM
Using 4.0 build 1548 build there does appear to be a problem.