WinSCPnet.dll does not throw the exception and hangs/locks the service which is invoking it.

Advertisement

RVidarte
Guest

WinSCPnet.dll does not throw the exception and hangs/locks the service which is invoking it.

Hey,

I'm using the WinSCPnet.dll to rename files in a SFTP, and it is working, but after a few files renamed, the process hangs/locks the service which is invoking it and the exceptions are written in the log but they are never thrown back to the service.

Thanks in advance for the assistance you can provide.

Reply with quote

Advertisement

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

Re: WinSCPnet.dll does not throw the exception and hangs/locks the service which is invoking it.

Please, enable debug logging (Session.DebugLogPath) and show us the log.

Reply with quote

martin
Site Admin
martin avatar

Re: WinSCPnet.dll does not throw the exception and hangs/locks the service which is invoking it.

The log shows just the connection. No renames. Are you starting a new session for each rename?

Reply with quote

Guest

Re: WinSCPnet.dll does not throw the exception and hangs/locks the service which is invoking it.

martin wrote:

The log shows just the connection. No renames. Are you starting a new session for each rename?

Yes, we were.
We are using BizTalk to pull files from a SFTP which we don't have delete rights, that's why we have to rename the file once it's grabbed by BizTalk in order to won't pull it again in the next run. Each file from the SFTP raises an instance in BizTalk and each instance was calling the WinSCPnet.dll for renaming the file (multithread), which didn't work. Then we moved it to a send port with OrderDelivery option (a queue) but the logic remained the same, each instance (file) was opening and closing a session; and this approach neither worked. In both scenarios we faced the same issue, the WinSCPnet.dll didn't throw any exception at all and it just hanged and locked the service instance until it was restarted manually by someone, and only then the file processing continued.

We came with a new approach, and now we have an orchestration in place, which collects all the file names in a period of time, creates a list with them, and from there we are calling the WinSCPnet.dll, opening the session, renaming all the files in the list and finally closing the session. This approach is working just fine!

But anyway, we are still concerned because of the issue we faced before with the other two approaches.

Any help is really appreciated.
Thank you.

Reply with quote

Advertisement

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

Re: WinSCPnet.dll does not throw the exception and hangs/locks the service which is invoking it.

There's no hang in the log.

On what statement does the service hang?

Anyway the root cause is probably that the server blocks you after too many logins.

Reply with quote

Advertisement

You can post new topics in this forum