Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: WinSCP endlessly reconnecting/disconnecting to Bitvise when insufficient disk space at destination

It seems that the server violates the SSH protocol. So WinSCP reconnects. And as the problem repeats, it gets into an endless loop.

If you want to forcefully abort the connection, use Session.Abort.
https://winscp.net/eng/docs/library_session_abort
speiris

WinSCP endlessly reconnecting/disconnecting to Bitvise when insufficient disk space at destination

Hi WinSCP,
We have recently discovered what is most probably a long standing issue and have had some trouble resolving it.

Our .NET C# codebase uses WinSCP to SFTP files to a Bitvise server. Everything works perfectly when destination has enough disk space.
A really edge case when there isn't enough space, we can see the activity on Bitvise it is continuously disconnecting and reconnecting every 5 seconds.
When debugging I saw that the breakpoint goes into PutFiles and gets stuck it never comes out. So I put it as a task on a separate thread and forced a timeout just to get the code moving along so with this the service doesn't hang anymore but on Bitvise it's still connecting and disconnecting endlessly.
var transferTask = Task.Run(() => _sftpSession.PutFiles(Path.Combine(tempDirectory, fileName), $"{transferLocationSFTP.DestinationPath}/{requestMTO.Destination.DestinationFilename}", true));
if (transferTask.Wait(TimeSpan.FromMinutes(1))){ //handle timeout

But after doing this if I try Close or Dispose again the code gets stuck.

Basically if there is insufficient space PutFiles or Close or Dispose will get stuck.

I wonder if you recognize this situation. This is an edge case we recently discovered, otherwise everything is working perfectly for ages. I updated WinSCP to the latest but yet it's the same. When I close down our filemover service is only when Bitvise stops reconnecting.

Any advise is most appreciated.

Hope you have a lovely weekend.