by uckelman » May 28th, 2020, 11:51 pm
Thus spake palad0n:
> As evinced by many posts over the years, many people have problems with
> frequent lost connections to the vassal server. In nearly all
> discussions, the most often cause cited is that the user has an issue,
> it is not a vassal server issue.
>
> But could the server actually be the real issue?
>
> What are the server's KeepAliveTime, KeepAliveInterval,
> TcpMaxDataRetransmissions and (possibly) the TcpTimedWaitDelay registry
> settings? The first may be set too low; sort of understandable given
> that we do not a lot of inactive connections clogging the server.
>
> If these are not manually set, the default values should be adequate,
> although 2 hours for KeepAliveTime may be too long.
I'm not sure what you're talking about here---the fact that you mention
the registry makes me think you're referring to a Windows machine?
On Linux, in /proc/sys/net/ipv4 I see:
tcp_keepalive_time = 7200
tcp_keepalive_intvl = 75
tcp_keepalive_probes = 9
My understanding is that these are more for detection of dead connections
rather than for actually keeping connections alive.
The test build I mentioned above contains an application-level keep-alive:
It send out an empty message two minutes after the previous message has
gone out, to keep the connection open. (I'm not a networking expert by
any stretch, but this is similar to what ssh does for keeping idle
connections from being closed by hostile things like routers using NAT
and such.)
--
J.