1758570 Members
2092 Online
108872 Solutions
New Discussion юеВ

ftp timeout

 
steven Burgess_2
Honored Contributor

ftp timeout

Hi all

We currently have an issue on a webserver which passes orders to one of our main depot boxes. The web server has a continous ftp connection pool running. Orders are made, a java script requests an ftp session then pushes the order across to the user. Every 5 - 10 orders the web side receive the message

Mon Apr 15 13:48:23 GMT+10:00 2002: LOEOrderServlet: About to upload file /usr8/LOE/INLE01/new/SYD842330.tmp


Mon Apr 15 13:48:30 GMT+10:00 2002: LOEOrderServlet: Failed to upload file
Mon Apr 15 13:48:30 GMT+10:00 2002: ================================================================================
Mon Apr 15 13:48:30 GMT+10:00 2002: Message : Timeout on reading response from the server after 6000ms
Mon Apr 15 13:48:30 GMT+10:00 2002: Exception : com.tnt.interaction.common.FtpTimeoutException

I have been advised that there are generally 5 or so ftp connections running at anytime.

in /etc/inetd.conf I have ftpd set to -l -v

All I see in my syslog is

User INLE01 timed out after 900 seconds at Mon Apr 15 14:09:26 2002

which is when I think they receive the message

If I check netstat -an

I see

tcp 0 56 FIN_WAIT_1

Is the above a problem ?

If i wish to increase the default timeout for ftpd to .5 hr the syntax in inetd.conf is -t1800 ?

Any help appreciated

Steve
take your time and think things through
7 REPLIES 7
Steven Sim Kok Leong
Honored Contributor

Re: ftp timeout

Hi,

ftpd default timeout value is 15 mins (600 seconds). Since you receive the error in exactly 600 seconds, this must be it.

You can finetune the ftpd section in your /etc/inetd.conf with parameter -t 1800 (1800 seconds or 30 mins) or longer.

Hope this helps. Regards.

Steven Sim Kok Leong
steven Burgess_2
Honored Contributor

Re: ftp timeout

Hi Steve

What do you think about the fin_wait_1 messages from the netstat -an
?

Steve
take your time and think things through
Steven Sim Kok Leong
Honored Contributor

Re: ftp timeout

Hi,

Sorry, made a typo. The ftpd default timeout value of 15 mins translates to 900 seconds (not 600 seconds). Your syslog.log indicates 900 seconds (which is the default timeout value).

Hope this helps. Regards.

Steven Sim Kok Leong
Steven Sim Kok Leong
Honored Contributor

Re: ftp timeout

Hi,

If you see FIN_WAIT_1, I suppose that meant that your connection is still waiting for ACK of the FIN sent to the destination. This is a problem when the destination system disconnect or reboot. Usually, there is a TIME_WAIT timer and a FIN_WAIT_2 timer but I don't remember a timer specifically for FIN_WAIT_1.

If you see a lot of hung FIN_WAIT_1 connections in your netstat, you might wish to perhaps shorten the tcp_keepalive_interval so that such connections will not hang forever.

# ndd -set /dev/tcp tcp_keepalive_interval 1800000

This sets the keepalive interval to 30 mins. Note however that this may impact your FTP data channel especially for long FTP transfers because the interval between the FTP control packets through the FTP control channel may exceed 30 mins for such transfers.

Hope this helps. Regards.

Steven Sim Kok Leong
steven Burgess_2
Honored Contributor

Re: ftp timeout

Hi

Sorry Steve 'typo' fin_wait_2 is the correct
state

Steve
take your time and think things through
steven Burgess_2
Honored Contributor

Re: ftp timeout

Hi

As I thought, increasing the timeout just allowed the user to be inactive for a longer period

Steve
take your time and think things through
steven Burgess_2
Honored Contributor

Re: ftp timeout

Hi

Since timeout increased no more failures on the webside

fingers crossed

Steve
take your time and think things through