I have a server running a largely default install of CentOS 6.4. It is behind a VPN and a firewall, neither of which are managed by me - they are managed by the hosting company.
When I leave an ssh client open for a long time without touching it (in cygwin from my desktop), eventually it freezes (Ctrl+C doesn't even work) and then after a much longer amount of time, it recovers but the ssh connection disconnects with a Connection Reset by Peer error.
Normally, I would not care about this, however: I have been developing a server application with a client GUI. The two applications do have a heartbeat between them. Today, I left them alone for under two hours and when I returned they had crashed. The server's error messages said:
java.io.IOException: Connection timed out java.io.IOException: Broken pipe The client's log said:
java.io.IOException: An established connection was aborted by the software in your host machine When I returned I clicked the "reconnect" button on the client without restarting either application and they are working correctly again with no issues - so it's not like one of the applications ran out of resources or equivalent.
I think this is more of a ServerFault question than a StackOverflow question because of the similar behavior I have seen in my ssh connections. What could be causing this network timeout, and what can I do about it?