WinSCP process terminated with exit code -1073741502 (C0000142)

Advertisement

jozsurf
Joined:
Posts:
4

WinSCP process terminated with exit code -1073741502 (C0000142)

Hello

We've been seeing a lot of the following in our error logs:
WinSCP.SessionLocalException: WinSCP process terminated with exit code -1073741502 (C0000142). There was no output. Response log file C:\local\Temp\wscp68E8.00313B98.tmp was not created. This could indicate lack of write permissions to the log folder or problems starting WinSCP itself.
There were some suggestions in the forums that updating to the latest version of WinSCP would eliminate some related problems and we have updated to 5.21.7 - unfortunately we're still seeing a lot of these errors pop up.

The context of the usage of WinSCP is that we are using it quite heavily in scheduled background processes that read and write files to a SFTP server. The frequency of these processes vary - from once daily to once every 2 minutes. It is entirely possible that the WinSCP process is being invoked by two separate requests at the same / similar time - would this be the cause of the problem?

This exception is being thrown from
WinSCP.Session.Open(SessionOptions sessionOptions)
Last edited by jozsurf on 2023-04-11 09:50; edited 1 time in total

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,517
Location:
Prague, Czechia

Re: WinSCP process terminated with exit code -1073741502 (C0000142)

How frequently are you opening new sessions? How many sessions can happen to be opened in parallel?

Reply with quote

jozsurf
Joined:
Posts:
4

How frequently are you opening new sessions?
When a scheduled process kicks off, we would typically open new sessions to check if there are files to process. These tend to be done one after another and because it is a polling mechanism, if there are no files to process, we could be opening multiple (5-6) sessions over a period of a couple of minutes (however long it takes to open the session and check the SFTP directory).

How many sessions can happen to be opened in parallel?
I can't say for sure but on some of our busier servers, it could be between 4-5 at the same time (between long running processes and processes that are scheduled to run every 2 minutes).

Reply with quote

martin
Site Admin
martin avatar

So can you collect all session and debug logs from single process, showing how some sessions succeed and then one suddenly fails?

Reply with quote

jozsurf

Do you mean WinSCP logs or my own application logs? If you're referring to WinSCP logs - how do I turn these on / access the logs? I'm running these applications on Azure app services.

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum