I'm using .NET Assembly of WinSCP(5.9.6.7601) for bulk file uploading to a ftp server.
As my file count is huge (approx 25K per day) I'm using multiple instances of the same applications for upload simultaneously. However the configuration contains the source & destination details separate for each of the application instances.
The process cannot access the file because it is being used by another process."
While running the FTP upload application there is no other application using the upload files so there is no way file is inaccessible, as per error message. Also same time other instances of the application keep uploading the files without any issues.
I've tried to capture session log using below code before opening the session, but there is no file getting generated. The occurrence of the issue is with user system. in dev environment unable to test as no access to the FTP server.
Do not use .xml extension for a plain text log file. Use .log or any other.
So Ideally the connection lost from server is the primary Error, however there is no other specific reason provided.
As the application is placed in a server with proper internet connection without any interrupted services I'm not sure if the connection Lost is from FTP server side or from our side.
Again the session used to close frequently earlier, so I did close & recreate the session after every 1000 Uploads to the server using below codes.
Please help me to get the fix for this.
Do you have an access to server-side log file?
Can you at least post a complete WinSCP log file? Though I'm not sure that ever with that, I'll be able to identify what causes the disconnect.
If you have an unreliable network/connection, you would have to deal with it programmatically.
Observations: Below log says the timeout set to 15 Seconds.
Now Here the error in log file. This may be due to the time set for timeout. But I've not set any such values.
< 2018-03-15 11:10:54.073 Script: Lost connection.