Here's what happens: when I run my program, which attempts connections over sftp about every minute, after a few hours to a few days I end up getting the following error message:
WinSCP.SessionLocalException: WinSCP process terminated with exit code 3 and output "", without responding (response log file (....)\23\wscp09D0.0399D345.tmp was not created). This could indicate lack of write permissions to the log folder or problems starting WinSCP itself.
at WinSCP.Session.Open(SessionOptions sessionOptions)
Fixes for this bug seemed to be upgrading to a new version of WinSCP and restarting the server, however I have only used a recent version and the machine I am trying to run the service on has been recently restarted, so these solutions do not help.