Tuning FTP/SFTP Timeouts for Downloading Files from FTP/SFTP
Default EagleML includes (getftpfile.inc and getsftpfile.inc) have a 60 second timeout set for downloading file from FTP/SFTP. This timeout is constant and cannot be set as a variable.
However, there is a pair of parameters which can help handle this process.
    For FTP:
FTP_RE_TRY_MAX_CNTÂ Â - max number of attempts to execute the command to download a file from FTP (5 attempts by default)
FTP_RE_TRY_ATT_INTERVALÂ - time in seconds between these attempts
    For SFTP:
S​FTP_RE_TRY_MAX_CNT  - max number of attempts to execute the command to download a file from SFTP (5 attempts by default)
SFTP_RE_TRY_ATT_INTERVALÂ -Â time in seconds between these attempts
For details on the above parameters, refer to Advanced Configuration Options.
In some specific cases, the MSGEXCHANGE/RUNPREPROCESSOR can fail in a couple of seconds (e.g., the CURL command is not valid) , which will make 5 default attempts expire too soon. Increasing the interval between attempts and the number of attempts can help with such issue.
Also, most  FTP/SFTP downloads are failed by the 60sec timeout and 5 attempts with 1 sec interval by default is typically enough. Below is the common scenario of the process, when the file is missing on FTP/SFTP:
Include is called
First download attempt
MSGEXCHANGE/RUNPREPROCESSOR fail after the 60sec timeout (file is missing on FTP/SFTP)
First download attempt is recognized as failed
Idle time set by FTP_RE_TRY_ATT_INTERVAL (1 second by default)
Second download attempt
When the number for the next attempt exceeds FTP_RE_TRY_MAX_CNT while the file has not been downloaded, an error is displayed.
Expected Total Timings for One File
Usual scenario (MSGEXCHANGE/RUNPREPROCESSOR attempt fails after the 60sec timeout):
Total timeout =Â FTP_RE_TRY_MAX_CNTÂ (default=5)Â * 60 seconds = 300 seconds by default
Unusual scenario (MSGEXCHANGE/RUNPREPROCESSOR fails in a matter of seconds):
Total timeout =Â FTP_RE_TRY_MAX_CNTÂ (default=5)Â * FTP_RE_TRY_ATT_INTERVALÂ