Too fast update with keepuptodate
Hi!
First of all I would like to thank the author, winscp is just awesome!
I'm running version 3.8.1 and is using the keepuptodate feature from a script to upload files from a directory that is updated every minute. It however jams a couple of times a week.
I run it from sync.bat:
using uploaderscript.txt:
which outputs:
but then at some point it jams and is not restarted by the goto-loop until I change the window focus to another application! This is the last output before it hangs:
Retry or possible skip would be the appropriate action here...
I think the problem is that it's too fast, it would need to wait a fiew seconds after a change is detected and then do the upload. The changing of the delay seems to be undocumented but existing? According to the History for 3.8 beta:
First of all I would like to thank the author, winscp is just awesome!
I'm running version 3.8.1 and is using the keepuptodate feature from a script to upload files from a directory that is updated every minute. It however jams a couple of times a week.
I run it from sync.bat:
@echo off : START "C:\Program Files\WinSCP3\WinSCP3.com" /script=uploaderscript.txt GOTO START
using uploaderscript.txt:
# Automatically answer all prompts negatively not to stall the script on errors option batch on # Disable overwrite confirmations that conflict with the previous option confirm off # Connect open user@domain.tld # Force binary mode transfer option transfer binary # Keep remote directory updated keepuptodate D:\Sync\Datafiles /home/user/data # Disconnect close # Exit WinSCP exit
which outputs:
batch on confirm off Initialisation... Searching for host... Connecting to host... Authenticating... Using username "user". Authenticating with public key "userkey" from agent. Authenticated. Starting the session... Reading remote directory... Session started. Active session: [1] user@domain.tld transfer binary Watching for changes, press Ctrl-C to abort... Scanning 'D:\Sync\Datafiles' for subdirectories... Watching for changes in 1 directories... Change in 'D:\Sync\Datafiles' detected. Local 'D:\Sync\Datafiles' => Remote '/home/user/data' D:\...\file1.bin | 0 kB | 0,3 kB/s | binary | 100% D:\...\file2.bin | 0 kB | 0,3 kB/s | binary | 100% Change in 'D:\Sync\Datafiles' detected. Change in 'D:\Sync\Datafiles' detected. Local 'D:\Sync\Datafiles' => Remote '/home/user/data' D:\...\file1.bin | 0 kB | 0,3 kB/s | binary | 100% D:\...\file2.bin | 0 kB | 0,3 kB/s | binary | 100% Change in 'D:\Sync\Datafiles' detected.
but then at some point it jams and is not restarted by the goto-loop until I change the window focus to another application! This is the last output before it hangs:
Change in 'D:\Sync\Datafiles' detected. Local 'D:\Sync\Datafiles' => Remote '/home/user/data' D:\...\file1.bin | 0 kB | 0,0 kB/s | binary | 0% Can't open file 'D:\Sync\Datafiles\file1.bin'. (A)bort, (R)etry, (S)kip, Ski(p) all: Abort
I think the problem is that it's too fast, it would need to wait a fiew seconds after a change is detected and then do the upload. The changing of the delay seems to be undocumented but existing? According to the History for 3.8 beta:
Synchronization enhanced: Synchronization delay for function Keep Remote Directory Up To Date is configurable (only directly in configuration files).