Page 1 of 1

Timeout on FTP_List

Posted: Mon Nov 15, 2021 3:54 pm
by bfc_nd
Hi,

We are using the FTPAPI as part of never-ending pgm to send/receive files from a client's server. We have been having intermittent problems with the FTP job getting hung in TIMW status. In reviewing our program, we are using the port and timeout options on the connection portion of the job, but I don't see that the FTP_List has an option for a timeout. I downloaded the latest version, hoping that it would have the Timeout option added to FTP_List, but no timeout option found.

Is there a way that I could add a Timeout option on the FTP_List procedure? Any suggestions would be greatly appreciated.

Max Blacknik

Re: Timeout on FTP_List

Posted: Tue Nov 16, 2021 8:51 pm
by Scott Klement
The timeout you specify on FTP_open() applies to the entire session, including FTP_list().

Re: Timeout on FTP_List

Posted: Thu Dec 02, 2021 10:52 pm
by bfc_nd
Scott,

Just to confirm, the timeout would also apply on a PUT stmt action as well? If that is true, I had a job that was hung/stuck doing a put to a Windows server from 6 am this morning until 5:30 pm today when I ended the job. Any ideas on how to determine why the FTP connection didn't timeout? It had made the connection, but failed to complete the transfer of the data file.

Max Blacknik

Re: Timeout on FTP_List

Posted: Fri Dec 03, 2021 11:27 pm
by Scott Klement
Tell me how to reproduce the problem, please.

Re: Timeout on FTP_List

Posted: Fri Jan 07, 2022 4:56 pm
by christiangut
I have exactly the same problem (TIMW while FTP_List())
From my understanding, this happens with active ftp sessions.

I suggested to modify the data connections so that they also respect the timeout (see viewtopic.php?t=12)

I tried to work around this problem using passive ftp and add the timeout to the last line of pasvcmd().

But I can currently not say if this helps.