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

Guest

Re: System.TimeoutException: Timeout waiting for WinSCP to respond

Thank you Martin. I've added this now. I'll monitor the script and update you.
martin

Re: System.TimeoutException: Timeout waiting for WinSCP to respond

$session.Timeout = New-TimeSpan -Seconds 120
Guest

Re: System.TimeoutException: Timeout waiting for WinSCP to respond

Sorry, I didn't get how to add the Session.Timeout to the current script. Can you please help ?
martin

Re: System.TimeoutException: Timeout waiting for WinSCP to respond

That's not what I suggested you to do.
Amar Venkata

Re: System.TimeoutException: Timeout waiting for WinSCP to respond

I've increased the Timeout value from 50 to 250 but it didn't help.
$sessionOptions.AddRawSettings("Timeout","250")
Amar Venkata

System.TimeoutException: Timeout waiting for WinSCP to respond

I haven't tried it and I'll try it next time. But any idea that why it's failing particularly in one schedule ?

Yes, We will upgrade it in the near future.
Amar Venkata

System.TimeoutException: Timeout waiting for WinSCP to respond

We have a PowerShell script which initiates a WinSCP session to SFTP the remote external server. The script runs 5 times in a day and it fails occasionally at 5:30 AM schedule only. We have enabled both the session and debug logging but the script has terminated with the exception by generating only the Debug log (attached here). However the script & WinSCP session executes successfully at other schedules. So, I need to understand why exactly WinSCP is failing at 5:30 AM for doing further investigation.

OS: Windows 2008 R2
WinSCP version: 1.2.6.5125