This is a problem that has annoyed me for quite a while, but I have not been able to reproduce the conditions reliably.
WinSCP: various versions from 3.something up to 4.3.7 downloaded today.
Client OS: win7 X64 enterprise.
server: CentOS running openssh-4.3p2-72.el5.7.5 plus several previous versions.
Connection mode: sftp-3
Today I connected to home, downloaded a file or two, then tried to upload a .psd file (700kB) via drag-and-drop using the commander interface. WinSCP froze (unresponsive to mouse clicks, connection time in status bar was frozen, etc) and then suddenly it went through the file upload process and back to normal. At that stage the timer started again at a value that was about 4 and a half minutes after it froze. It did not restart the timer until after the upload had finished (nor draw anything else in the status line during the upload).
I then enabled logging, and started another upload and it froze as well. I also had the log window enabled and it also froze after showing a bunch of "session upkeep" lines. I think I had debug-1 level enabled.
Meantime I started another instance in WinSCP and connected to a different server running the same software and successfully uploaded about 10 different files (one at a time) - different sizes, text, binary, any variable I could think of. It never froze.
After something like 15 minutes I killed the original WinSCP program. The log file was zero length.
I compared the session settings - the only difference I could see between them was that I had compression ticked on the one that froze, but not on the other. So I tried with compression off, and it uploaded several files, but froze again on about the 3rd or 4th file from my home server.
A snippet of the log file shows
. 2012-03-09 19:03:12.106 Session upkeep
. 2012-03-09 19:03:12.106 [Background 1] Session upkeep
. 2012-03-09 19:03:12.619 Session upkeep
. 2012-03-09 19:03:12.619 [Background 1] Session upkeep
. 2012-03-09 19:07:15.330 [Background 1] File: "...filename....txt"
. 2012-03-09 19:07:15.330 [Background 1] Copying "...filename.....txt" to local directory started.
. 2012-03-09 19:07:15.330 [Background 1] Ascii transfer mode selected.
. 2012-03-09 19:07:15.331 Session upkeep
. 2012-03-09 19:07:15.338 Session upkeep
. 2012-03-09 19:07:15.515 Session upkeep
. 2012-03-09 19:07:15.952 [Background 1] Opening remote file.
> 2012-03-09 19:07:15.952 [Background 1] Type: SSH_FXP_OPEN, Size: 135, Number: 9731
. 2012-03-09 19:07:15.952 [Background 1] Sent 139 bytes
. 2012-03-09 19:07:15.952 [Background 1] There are 0 bytes remaining in the send buffer
... etc
Note there is a 4 minute gap where nothing happens, then it proceeds (I guess) normally.
There is one other factor that I have observed, which may or may not be relevant.
Whenever I have noticed it lock up, the destination folder has been a mapped drive on a network share. Some sort of large ms-Windows file-server system. I tried a series of uploads from home to a local partition and it did about 10 files without a problem.
I switched to the ssh server that had not given any problems (uncompressed mode) and started uploading to a share on the file-server. It froze on the second file. And again the interval was close to 4 minutes.