Topic "WinSCP.ini file in use"

Author Message
drfunk2458
[View user's profile]

Joined: 2012-10-15
Posts: 7
Location: East Coast
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
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
Set the INI file read-only:
http://winscp.net/eng/docs/config#ini
_________________
Martin Prikryl
tomb
[View user's profile]

Joined: 2013-07-05
Posts: 19
Are there any side-effects after making the WINSCP.INI read-only? What write attempts are done to WINSCP.INI?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
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:
http://winscp.net/eng/docs/scripting#configuration

Quote:
What write attempts are done to WINSCP.INI?

There are meany reasons, caching for instance.
tomb
[View user's profile]

Joined: 2013-07-05
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. Smile

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.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
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:
http://winscp.net/tracker/show_bug.cgi?id=996
Please upgrade.
tomb
[View user's profile]

Joined: 2013-07-05
Posts: 19
That sounds great. I forgot to tell that my version is 5.1.6. I will try 5.1.8
tomb
[View user's profile]

Joined: 2013-07-05
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?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
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.
tomb
[View user's profile]

Joined: 2013-07-05
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.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
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.
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License