Why i am getting "ListTimeout Expired" issue while fetching huge volume of files via sftp?

0 votes
asked Feb 28 by alexander.junior (380 points)

I am getting list time out issue when fetching files in the range of 80k or so, using SftpItemCollection List and files download being tested . With 50k it worked fine and got downloaded successfully by 6 minutes or so. Please advise a solution ASAP.

Exception is as below:
List Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
i have followed below code level:
_listSftp.ListItemReceived += (s, e) =>
SftpItem item = e.Item;
objSFTPFile = new SFTPFile();
objSFTPFile.FileType = "DDS300";
objSFTPFile.Extension = "DDR";
objSFTPFile.Status = SFTPStatus.L.ToString();
objSFTPFile.FileName = item.Name.Trim();
objSFTPFile.FileSize = item.Size;
objSFTPFile.Mode = SFTPMode.D.ToString();
objSFTPFile.BankCode = Common.BANKCODE;
Common.WriteLog(MethodInfo.GetCurrentMethod().Name + " FileType: " + objSFTPFile.FileType + " FileName: " + objSFTPFile.FileName, ServiceThread.Listing.ToString());
// skip adding item to resulting collection

                // clear resulting collection first

                // issue directory listing
                SftpItemCollection List = _listSftp.GetList(GetSFTPServerPath("st"));

and then saved to Table in sql where command time out also is given. (600 or so)

Applies to: Rebex SFTP

1 Answer

0 votes
answered Feb 28 by Lukas Matyska (44,190 points)

Hello, it seems that the error is reported by the SQL server not the SFTP server.

Can you please post here complete exception with stack trace. It can be produced like this:

    // do something ...
catch (Exception ex)
    string completeErrorDetails = ex.ToString();
    // log the error ...