Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

Sanjeewa

Re: System.TimeoutException

martin wrote:

So you are running it in parallel?!? The machine may be overloaded. Did you try increasing Session.Timeout?
https://winscp.net/eng/docs/library_session#timeout


Got the point. I'll try this. Thanks
Sanjeewa

System.TimeoutException

Thanks for the reply. I'm using only one connection. there's no any parallel connections. This is created as a exe file and it's running on task scheduler. there're number of similar instances of this exe running in the scheduler like this using winscp
martin

Re: System.TimeoutException

That error is happening when opening a connection. It can hardly be related to "large number of files". Unless you are opening many parallel connections. Are you?
Sanjeewa

System.TimeoutException

I'm using winscp 5.17
and using with C#.net like below
SessionOptions sessionOptions = new SessionOptions
{
    Protocol = Protocol.Sftp,
    HostName = Settings.ftphost,
    UserName = Settings.ftp_username,
    Password = Settings.ftp_password,
    SshHostKeyFingerprint = Settings.SshHostKeyFingerprint,
    PortNumber = int.Parse(Settings.ftp_port)
};
 
using (Session session = new Session())
{
    session.Open(sessionOptions);
 
    if(session.FileExists(remotePath))
    {
        session.RemoveFiles(remotePath);
    }
       
    if (session.Opened == true)
        session.Close();
}


When I'm using with large number of files it gives me an error like this. This not happens for every time.


System.TimeoutException: Timeout waiting for WinSCP to respond - WinSCP has not responded in time. There was no output. Response log file C:\abc.tmp was not created. This could indicate lack of write permissions to the log folder or problems starting WinSCP itself.
at WinSCP.Session.CheckForTimeout(String additional)
at WinSCP.Session.Open(SessionOptions sessionOptions)


Still couldn't find any solution for this as this happening for large number of files