1

I have a few linux servers inside a customer that recently MASSIVELY increased his bandwidth - from about 0.8/5mbps to 25mpbs/100mbps... (yes 100mpbs!) this is very good, but ever since my WinSCP/Putty connections go stalled if I leave them for a few moments.. if regularly interact (I type or navigate/send files without much pause) it works ok.. and then if I go onto a different task for a moment or two, sure enough putty/winscp stalls and I have a dead connection.. it's like the internet "stopped" or I went offline.

BUT->if I break open a new connection on a new putty window it's immediately responsive, so I think it's perhaps todo with a MTU setting but I don't know what that is or what to change it to nor how.

EDIT

The answers from @NickW and @MadHatter were correct: however for future use - you may fix this by setting WinSCP / putty keepalive... for completeness here is a screenie enter image description here

  • 1
    Seems like a timeout problem. As you will be dropped by SFTP or SSH when certain time is passed. Please check or post you're FTP/SSH config. Check the syslog as well might give you info why you were dropped. – mYzk May 21 '14 at 11:08
  • these servers never did it before and have run for 2 years no issue.. all the connections regardless of centos server (there are 5) do it now, it has to be related to something not happening "fast" enough for the new connection - it feels like the new connection is more sensitive to the poor internet connection I have here (it's terrible) wheras when it was slower at both ends it seemed much happier - Remote Desktop Connection via Windows is unaffected – user26676 May 21 '14 at 11:09
  • If that bandwidth upgrade included new CPE (customer premises equipment) like a new router, you could be running into state table entries going stale. – MadHatter May 21 '14 at 11:12
  • @MadHatter thanks - what did you mean by that - yes it was a new router – user26676 May 21 '14 at 11:14
1

As Madhatter stated, there's a new router in the middle, and it's obviously more aggressive with timeouts, the simple solution in putty would be to change a few timeout options inside putty.

In the session, open the Connection window, enable keepalives set it to 5, and also ensure that Enable TCP keepalives is also checked. The first keepalives is internal to SSH, and is probably not the problem, but it doesn't hurt to set it.

  • ok thanks, you're talking about settings in putty/winscp right? BTW: I checked, the MTU of the new router is 1492 (bytes) - it is a netgear router.. – user26676 May 21 '14 at 11:27
  • Yes, those are settings inside putty. That's a completely normal MTU, and unless you're having weird problems with SSL, it's not worth changing. – NickW May 21 '14 at 11:29
  • I have applied those setts (easily found, thanks) I will see if they help - trialling now by going on lunch :-P – user26676 May 21 '14 at 11:32
  • thanks, this seems to work, 35 minutes idle and it's going fine @MadHatter was also correct about why though.. anyway thanks to you both – user26676 May 21 '14 at 12:09
  • Madhatter is right about a lot of things :) – NickW May 21 '14 at 12:14
0

Given that we know there's a new router involved, this may be an issue with state table entries going stale.

Basically, the NAT table in the router, that maps internal addresses and port numbers to external addresses and port numbers, is not infinitely expansible. To prevent memory exhaustion, most such devices keep a note of how recently a particular entry was used, and sufficiently-old ones are deleted.

Sometimes, you can get around this by enabling TCPKeepAlives in your ssh config, which help keep traffic flowing over what might otherwise be an idle ssh connection. Sometimes, however, the router is so aggressive at reclaiming table space that it becomes impossible to keep a connection up for more than a set period. If that turns out to be the case, reconfiguring or replacing the router may be your only options.

  • @NickW I did the putty settings change, @MadHatter Actually, I do have 15 port forwards set up, I might have to get the customer to get a new router.. how do I enable TCPKeepAlives in my ssh config that's in centos right? – user26676 May 21 '14 at 11:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.