Am 24.07.2012, 01:55 Uhr, schrieb Matt Johnston <[email protected]>:
When you kill a process the OS will close its TCP connections by sending
a reset packet to the other side. If the whole machine turns off those
packets can't be sent.
After it reboots, the OS should reject packets from the stale
connections and reset them then. But that'll only happen when data or a
TCP keepalive is transferred (I think).
Thanks for this hint. Using information from
http://tldp.org/HOWTO/TCP-Keepalive-HOWTO/overview.html
and its next page, I drastically reduced keepalive constants in my
vserver, and the problem has been solved.
Next step is testing dbclient's -K option and see whether port forwarding
is re-connected when the server dies and restarts. I'll let you know if
this works (eventually with patch as proposed in
http://comments.gmane.org/gmane.network.ssh.dropbear/962 ), prior to using
extra resources (autossh). I'll let you know.
Rob