Freeze FTP

Advertisement

SamK
Joined:
Posts:
2

Freeze FTP

I'm experiencing some strange behavior using WinSCP .NET in a C# .NET 4.8 application. I'm not sure if it's caused by WinSCP, but maybe you could help me pinpoint the error. I'm using the latest version of WinSCP through the NuGet package.

When trying to send large amounts of files from a client to a server, the connection freezes after about one minute. This happens on a bunch of locations, using FTP and FTPS, but not at others.

The log notice I see is:
[2020-06-14 17:16:13.028] [000b]     Waiting for log update and dispatching events for 800
[2020-06-14 17:16:13.841] [000b]     Waiting for log update and dispatching events for 800
[2020-06-14 17:16:14.653] [000b]     Waiting for log update and dispatching events for 800
[2020-06-14 17:16:15.466] [000b]     Waiting for log update and dispatching events for 800
[2020-06-14 17:16:16.278] [000b]     Waiting for log update and dispatching events for 800
[2020-06-14 17:16:17.091] [000b]     Waiting for log update and dispatching events for 800
[2020-06-14 17:16:17.903] [000b]     Waiting for log update and dispatching events for 800
[2020-06-14 17:16:18.716] [000b]     Waiting for log update and dispatching events for 800
[2020-06-14 17:16:19.528] [000b]     Waiting for log update and dispatching events for 800



Unfortunately the complete logs got overwritten, but I could reproduce them if it'd help.

I already raised the Session.Timeout to 30 minutes, and SessionOptions.Timeout to 2 hours. The client uses multiple connections to send files parallel (max 3 at a time), but the same occurs when I use a singlethreaded method.

Thanks for your time. Perhaps this already raises a flag for you to point me in the right direction, but if you need more info please let me know.

On a sidenote; thanks for WinSCP and it's amazing .NET integration :)

Reply with quote

Advertisement

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

Re: Freeze FTP

Sorry, this is not enough information. Please post a full session and debug log file for the simplest scenario that reproduces the problem.

Reply with quote

SamK
Joined:
Posts:
2

Re: Freeze FTP

Alright, I reproduced the problem. The logs are attached in the private (zip) file. I think these are the relevant files:


There are more logs, but they're 25MB so couldn't attach them. Let me know if you need them, and I'll give you a link.

I'm using three separate threads in which I start a WinSCP session. These are my SessionOptions:
var sessionOptions = new SessionOptions
{
    Protocol = Protocol.Ftp,
    HostName = "---",
    PortNumber = 21,
    UserName = "---",
    Password = "---",
    FtpSecure = FtpSecure.Explicit,
    Timeout = TimeSpan.FromHours(2),
    TlsHostCertificateFingerprint = "---",
    FtpMode = FtpMode.Passive,
};
I give the Session itself a timeout of 30 min.

This code has been used a lot, without any troubles. However recently on a few machines it started freezing after a short period.

FileZilla server only shows 'disconnected'.
  • SamK_Freeze_FTP_logs.zip (1.52 MB, Private file)

Reply with quote

martin
Site Admin
martin avatar

Re: Freeze FTP

All the three sessions froze at the same moment, yet at different phases of the operation. I have no idea what might cause this. I can send you a debug build of WinSCP if you want to investigate further. Email me if you are interested.

Reply with quote

Advertisement

You can post new topics in this forum