Scripted Transfer Leaving Multiple Sessions Open

Advertisement

Zekless
Guest

Scripted Transfer Leaving Multiple Sessions Open

If I look in my task manager after the script has been running for about a week or so, I see multiple instances of "Console Interface for WinSCP (32 bit)" and "WinSCP: SFTP, FTP, WebDAV, S3 and SCP client (32 bit)" running in my task manager. If unaddressed this consumes alot of the servers resources and eventually starts to cause it to slow down drastically and crash other services. I have attached an image of my task manager.

My script does have an exit command and it does NOT appear to leave an instance running after each time the script fires. It runs every 60 seconds and leaves about 4 of them running a day.

I have updated WinSCP to the latest version at the time of this post which is 5.17.3. The only way I have been able to clean this up is to add a "taskkill /F /IM WinSCP.exe" to then end of the bat file that executes the script. Anyone know what may be going on? Thanks for your help.

Below is an example of the WinSCP script.
option batch continue
option confirm off
open Connection
cd /Outbound
lcd D:\Downloaded
get -delete *.txt
cd /Inbound
lcd D:\Upload
put -nopermissions -nopreservetime -delete *.txt
close
exit

Description: Shows Multiple Instances in TaskManager

WinSCP_Multiple.jpg

Reply with quote

Advertisement

martin
Site Admin
martin avatar

Zekless wrote:

Yes, Please see the attached log.
The are over 400 sessions in the log. Which of them failed to close?

Reply with quote

Advertisement

Delurn

Scripted Transfer Leaving Multiple Sessions Open

Is there a way to tie them together. This script runs every 60 seconds. How can i tell which ones are left open? Does the log not indicate it was left open?

Reply with quote

martin
Site Admin
martin avatar

Re: Scripted Transfer Leaving Multiple Sessions Open

In the Task Manager find the Process ID of an instance that failed to close. The process ID is logged in WinSCP session log file, so we can use the ID to look up a log of that instance.

Reply with quote

Advertisement

You can post new topics in this forum