Topic "Setting "session timeout?""

Author Message
[View user's profile]

Joined: 2016-09-02
Posts: 8
Our vendor just moved us to a new SFTP server, and I'm now having intermittent issues with downloads that had been working.

I'm attaching the powershell script where I thought that adding
$session.Timeout = new-timespan -minutes 5
would do the trick, but apparently I'm guessing wrong!

I'm also attaching the debug log file, showing a 15 second timeout, I think.

What's the correct way for me to, as the vendor recommended, "...increase the time out in winscp..." ?

PowerShell_Script.txt (5.4 KB) Private file

Description: (none)

20170316-1207_SessionDebug.log (121.55 KB) Private file

Description: (none)

[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 27083
Location: Prague, Czechia
I cannot see any timeout in the log.

Anyway, you probably want this:

$sessionOptions = New-Object WinSCP.SessionOptions -Property @{
    Timeout = new-timespan -minutes 5

(You actually have it already in the code, just commented-out).
[View user's profile]

Joined: 2016-09-02
Posts: 8
Thanks again, Martin.

I think I had that line commented out because I wasn't sure it was the right way to do it -- but I didn't realize I had NO method in use, so I appreciate the pointer!

I'm trying again with tonight's scheduled run.

You can post new topics in this forum


What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License