Try running this as root under Linux, and see if it helps: sysctl -w net.ipv4.tcp_keepalive_time=60 net.ipv4.tcp_keepalive_intvl=60 I had similar issues, and increasing the kernel keep-alive frequency solved them for me.
Try running this as root under Linux, and see if it helps: sysctl -w net.ipv4.tcp_keepalive_time=60 net.ipv4.tcp_keepalive_intvl=60