Copying files from remote side failed. Failure writing network stream.

Advertisement

dotps1
Contributor
Joined:
Posts:
20
Location:
United States

Copying files from remote side failed. Failure writing network stream.

I have a scheduled task that runs during the night and downloads a very large database bak file (around 10GB). And many nights if fails. But when I run the scheduled task (not just run the script) it works fine everytime. Does this error look more like an issue with the remote side FTP server?
WinSCP.SessionRemoteException: Error transferring file '/DatabaseBackupFile.BAK'. ---> WinSCP.SessionRemoteException: Copying files from remote side failed.
                    Failure writing network stream.
I really don't understand why it works manually everytime, that leads me to believe either a network hiccup or something with the remote side FTP server.
  • SessionLog.txt (20.48 KB, Private file)
Description: I will enabled debugging log as well if need be.

Reply with quote

Advertisement

dotps1
Contributor

Re: Copying files from remote side failed. Failure writing network stream.

huh, ill reach out to the vendor and see if they have any AV on there system, the server I am using to run the task has not AV on it.

Thanks for the info, I will let you know what I find out.

Reply with quote

dotps1
Contributor
Joined:
Posts:
20
Location:
United States

re download with while loop?

Martin,
While I'm waiting on the vendor, is there a way to make the script retry the download on this error? I was thinking of doing like a while loop.

$result = $null
while ($result.Failures.Count -ne 0){
    $result = # Download file here.
}

but I was wondering if there is a built in way to handle this.

thanks.

Reply with quote

dotps1
Contributor
Joined:
Posts:
20
Location:
United States

use_sendfile=no

Martin,
Is it possible to incorporate this from the client side?

<invalid hyperlink removed by admin>

or would this be something that has to happen on the server side?
_________________
https://github.com/dotps1

Reply with quote

Advertisement

martin
Site Admin
martin avatar

Re: re download with while loop?

WinSCP retries only if the connection is lost while transferring. What is probably not this case.

And, yes, that's a server-side setting.

Reply with quote

Advertisement

You can post new topics in this forum