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

martin

Please post a complete log file.
johnmsch

Here are some snippets from a recent log file, where it gets an error, skips the file and continues on:
GA47607_20190616_20190616 |         321 KB |  239.3 KB/s | binary |  99%

Error transferring file '/webdav/Formulary/FBS_3_0/OPTUMCOM/FSL/GA47607_20190616_20190616'.
Could not read response body: An existing connection was forcibly closed by the remote host.
(A)bort, (R)etry, (S)kip, Ski(p) all: Skip
GA47623_20190616_20190616 |         323 KB |  222.5 KB/s | binary | 100%


SC30434_20190616_20190616 |         323 KB |   66.9 KB/s | binary |  99%
Error transferring file '/webdav/Formulary/FBS_3_0/OPTUMCOM/FSL/SC30434_20190616_20190616'.
Could not read response body: connection timed out
(A)bort, (R)etry, (S)kip, Ski(p) all: Skip
SC30526_20190616_20190616 |         326 KB |   60.9 KB/s | binary | 100%

These are the two types of errors I sometimes see. WinSCP is doing exactly what I expect, and I see the dilemma on your side in how to handle the "500 Internal Error". IMO, the 500 is a fatal error and WinSCP should stop then and there.

Thank You
martin

johnmsch wrote:

It does however make sense to stop with the internal error, as that one is fatal.

OK, it makes sense in this specific scenario. And there will be other scenarios, where "internal error" is recoverable. There's no easy solution.

Would you rather post a log file for the "Could not read response body: connection timed out" error? Maybe there's a way to improve robustness for that scenario.
johnmsch

Thanks for the quick reply @martin.
During syncs, I occasionally get a "Could not read response body: connection timed out" error, but the script will continue on to the next file, as I have it set to skip those. When they are skipped, it continues on to the next file. If I use the abort option, will WinSCP stop? Given that this process can sync hundreds, if not thousands of files per day, I really need it to continue on with this minor error. It does however make sense to stop with the internal error, as that one is fatal.
martin

Re: "Internal Server Error" delted local folders!

So do not use batch continue. Use batch abort.
johnmsch

"Internal Server Error" delted local folders!

I have a script that has been running successfully for a couple years. Yesterday it got a "500 Internal Server Error" and deleted two folders on the local server that had hundreds of folders with tens of thousands of files. Fortunately, I was able to restore the folders from a backup. Below is the log from when this happened.
Is there a setting I'm missing? Is this a bug? The local folders shouldn't have been deleted just from an internal server error.
X:\FormularyDirectory\etc\DavClient>"C:\Program Files (x86)\WinSCP\WinSCP.com" /script=FormularyDownload.WinSCP.PROD.scp /timeout=120 

batch           continue 
reconnecttime   120       
echo            on       
option
echo            on       
batch           continue 
confirm         off       
reconnecttime   120       
failonnomatch   off       
open https://xxxxxxx:***@files.xxxx.net/webdav -timeout=120
Connecting to host...
Authenticating...
Authenticated.
Starting the session...
Error changing directory to '/webdav'.
500 Internal Server Error
Session started.
Active session: [1] xxxxxxx:***@files.xxxx.net
synchronize local X:\FormularyDirectory\etc\DavClient\downloads\xxxx\webdav\Formulary /webdav/Formulary -delete -criteria=either
Comparing...
Local 'X:\FormularyDirectory\etc\DavClient\downloads\zzzzz\webdav\Formulary' <= Remote '/webdav/Formulary'
Error listing directory '/webdav/Formulary'.
500 Internal Server Error
(A)bort, (R)etry, (S)kip: Skip
Synchronizing...
Local 'X:\FormularyDirectory\etc\DavClient\downloads\zzzzz\webdav\Formulary' <= Remote '/webdav/Formulary'
'X:\FormularyDirectory\etc\DavClient\downloads\zzzzz\webdav\Formulary\FBS_1_0' deleted
'X:\FormularyDirectory\etc\DavClient\downloads\zzzzz\webdav\Formulary\FBS_3_0' deleted
exit