WinSCP.ini file in use

Advertisement

drfunk2458
Joined:
Posts:
7
Location:
East Coast

WinSCP.ini file in use

I have been getting intermittent failures using WinSCP from the command line. I just saw this error in my log today.
Can't create file 'C:\Program Files\WinSCP\WinSCP.ini'.
System Error. Code: 32.

The process cannot access the file because it is being used by another process


I run a perl script that multi-threads SFTPs to 16 different servers.
Should I try the Windows Registry option or something else to avoid this collision?

Thanks,

MF

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
27,253
Location:
Prague, Czechia

tomb wrote:

Are there any side-effects after making the WINSCP.INI read-only?
No. In fact, for scripting, I would even recommend it. But only for cases where you cannot do without an INI file. Better approach is to isolate the script from any configuration:
https://winscp.net/eng/docs/scripting#configuration

What write attempts are done to WINSCP.INI?
There are meany reasons, caching for instance.

Reply with quote

tomb
Joined:
Posts:
19

I initiate about 5000-10000 WINCSP connections per day in batch on my server and about 20-50 of them run into "The process cannot access the file because it is being used by another process"

I changed my shared WINSCP.INI to make it read-only and indeed this solved the error. Thanks for your help. :)

But, after migrating my server from W2003 to W2008, I get another problem. Somehow, I feel this is related.
In the past 10 days I have run 3x into the problem that (after running fine for days) instantly all started WINSCP sessions fail with ERRORLEVEL 3, without generation any logfile.
The command used is:
winscp /script=<.....>.txt /log=<.....>.log

The only way I found to repair this is a reboot of the server. After rebooting, all works fine for a few days again. I feel that this might be an issue with a locked configuration file.
Any idea or advice?

Today I changed the WINSCP.INI to read-write again in order to find out if this is related to my problem. I will post my results here.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,253
Location:
Prague, Czechia

tomb wrote:

But, after migrating my server from W2003 to W2008, I get another problem. Somehow, I feel this is related.
In the past 10 days I have run 3x into the problem that (after running fine for days) instantly all started WINSCP sessions fail with ERRORLEVEL 3, without generation any logfile.
It's this bug:
https://winscp.net/tracker/show_bug.cgi?id=996
Please upgrade.

Reply with quote

tomb
Joined:
Posts:
19

I upgraded from 5.1.6 to 5.1.8 on my W2008 R2 server. It was used intensively and ran fine for 6 days.

Then from one instant to the other all WINSCP scripts failed with errorlevel=3 again. That is the 5.1.6 behaviour. A reboot of the server solved the issue for 4 days but the problem reoccured. So it seems that bug 996 is not solved in 5.1.8.
At the moment I have no other option than to revert to 5.1.6 on a W2003 server.


Should I report this in another thread?

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,253
Location:
Prague, Czechia

I'm sorry. That was mistake. The bug was fixed in 5.2.5 only. I've corrected the entry in the tracker.

Reply with quote

tomb
Joined:
Posts:
19

Thanks. That is good to read. Is bug 996 fixed in 5.5 too? I ask because the 5.2.x versions are not released yet.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,253
Location:
Prague, Czechia

tomb wrote:

Thanks. That is good to read. Is bug 996 fixed in 5.5 too? I ask because the 5.2.x versions are not released yet.
5.2.x branch was superseded by 5.5. So, yes, it's fixed in 5.5.

Reply with quote

Advertisement

You can post new topics in this forum