user5441417
user5441417

Reputation: 101

WinSCP .NET assembly - Session output gets too big

I am using the WinSCP .NET assembly in order to "monitor" on a FTP server, and download every file that is uploaded to the FTP server.

After leaving my program running all night, the ram usage was over 1gb, and after debugging and checking with profiling programs, it happened because of Session.Output, which is an Enumerable collection of strings, which never gets cleared, and collects everything that happens to this Enumerable instead into a log file. I tried adding log file paths to Session.DebugLogPath and Session.SessionLogPath, which copied the Enumerable into a file, but didn't clear it.

How can I disable / clear the Session.Output?

Upvotes: 0

Views: 776

Answers (1)

Martin Prikryl
Martin Prikryl

Reputation: 202360

Since WinSCP 5.7.6, WinSCP .NET assembly holds only the last 1000 lines of the output.

Please upgrade.


Note that the Session.Output is not related to the Session.SessionLogPath or the Session.DebugLogPath. They each log different information.

Upvotes: 1

Related Questions