Hanging when moving files on SFTP server

Advertisement

Anakardian
Joined:
Posts:
4

Hanging when moving files on SFTP server

Hi

For about a year I have had a SSIS package generate 13 files and send them off to a SFTP server.
After modifying the SSIS package to generate an additional file to be transferred, WinSCP hangs after transferring the last file. The SSIS package will happily wait 6+ hours for it to finish.

Looking in the log for the move, nothing is recorded while it hangs.
Once the SSIS package is aborted, the log resumes and WinSCP appears to be ending the transfer normally.

Any idea what could be causing this?

WinSCP version: 5.17.8, updated from old version with same issue.
Transfer protocol: SFTP

Command executed with "Excute Process Task" in SSIS:
/log="D:\FolderRemoved\logfileMove.log" /loglevel=2 /logsize=5*10M /command "Username:***@Server:Port -hostkey=""Hostkeyinfo"" " " " "option transfer binary" "option batch abort" "option confirm off" " " " mv /FolderRemoved/TEMP/*.csv /FolderRemoved/TEST/" " " "close" " " "exit"

Excerpt from log at level 2 for the move of the 14th file is attached.
Notice the timestamps jump from 11:37 to 11:40.
It just stops doing anything at the last 11:37 timestamp until it is aborted at 11:40.
  • Log excerpt.txt (2.63 KB, Private file)

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,567
Location:
Prague, Czechia

Re: Hanging when moving files on SFTP server

Please attach a full session log file showing the problem (using the latest version of WinSCP).

Reply with quote

Anakardian
Joined:
Posts:
4

I have attached a modified log file since it contained the password to the server in line 15 and line 947.

The log contains a normal run with everything working and a failed run. In this case it hung before the end of the operation but this has also been seen before.

The problem occurs at line 1475-1476.

After completing the file move in line 1475, it just stops.
When the tun is aborted, it resumes operation and completes the entire move task from line 1476.
  • SPlogfileMove.log (145.49 KB, Private file)

Reply with quote

martin
Site Admin
martin avatar

Thanks for the log.
I'm sending you an email with a development version of WinSCP to the address you have used to register on this forum.

Reply with quote

Anakardian
Joined:
Posts:
4

Trace files

Hi Martin

Sorry for the delay but I finally had a chance to get the trace run.

I have attached the files generated.

The hanging occurred in the file WinsSCP3670trace.log between lines 92371 and 92373.
  • Winscp debug.zip (1.37 MB, Private file)
Description: 6 trace files from a run where the process hung

Reply with quote

Advertisement

martin
Site Admin
martin avatar

Re: Trace files

It hangs while writing a console output. That's something out of WinSCP control. Are you executing winscp.com directly from SSIS? Or is there some wrapper script? Can you try to replace winscp.com with winscp.exe? If you are executing winscp.com directly, you cannot see/capture its output anyway, so it should not matter.
See also https://winscp.net/eng/docs/guide_ssis#task

Reply with quote

Anakardian
Joined:
Posts:
4

Thank you for the digging to figure out what is happening.

I am already using the process task from SSIS so that part is good.

I ran a test where the only change was using the .exe instead of .com. That went well for the .exe version while the .com version failed.

Why we were using the .com version is down to legacy. Someone moved from using a windows task to run this to a ssis package and used the same code there to make it work as it used to.
No one thought there would be a difference so we suddenly had that problem appear.

Thank you for the help in figuring it out.

Regards

Anakardian

Reply with quote

Advertisement

You can post new topics in this forum