System.TimeoutException: Timeout waiting for WinSCP to respond

Advertisement

Amar Venkata
Guest

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
Description: Debug log generated by WinSCP

Reply with quote

Advertisement

Amar Venkata
Guest

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.

Reply with quote

Amar Venkata
Guest

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")

Reply with quote

Advertisement

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 ?

Reply with quote

martin
Site Admin
martin avatar

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

$session.Timeout = New-TimeSpan -Seconds 120

Reply with quote

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.

Reply with quote

Advertisement

You can post new topics in this forum