0 votes
by (600 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;
ListSFTPFile.Add(objSFTPFile);
Common.WriteLog(MethodInfo.GetCurrentMethod().Name + " FileType: " + objSFTPFile.FileType + " FileName: " + objSFTPFile.FileName, ServiceThread.Listing.ToString());
// skip adding item to resulting collection
e.Ignore();
};

                // clear resulting collection first
                ListSFTPFile.Clear();

                // 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
by (72.7k 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:

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