Timeout on FTP_List

Discussions related to FTPAPI (An FTP client package for RPG programming.) http://www.scottklement.com/ftpapi/
Post Reply
bfc_nd
Posts: 2
Joined: Mon Nov 15, 2021 3:44 pm

Timeout on FTP_List

Post 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
Scott Klement
Site Admin
Posts: 635
Joined: Sun Jul 04, 2021 5:12 am

Re: Timeout on FTP_List

Post by Scott Klement »

The timeout you specify on FTP_open() applies to the entire session, including FTP_list().
bfc_nd
Posts: 2
Joined: Mon Nov 15, 2021 3:44 pm

Re: Timeout on FTP_List

Post 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
Scott Klement
Site Admin
Posts: 635
Joined: Sun Jul 04, 2021 5:12 am

Re: Timeout on FTP_List

Post by Scott Klement »

Tell me how to reproduce the problem, please.
christiangut
Posts: 3
Joined: Fri Aug 06, 2021 8:52 am

Re: Timeout on FTP_List

Post 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.
Post Reply