Shorten server keepalive period to 5 minutes
Historically the default gRPC server keepalive interval of two hours has
been fine for Gitaly. However, with the introduction of Gitaly Cluster
we now have to deal with more aggressive idle connection pruning from
the Praefect load balancer. This has caused long-running RPCs that don't
communicate with the client, such as ForkRepository
, to be killed.
gitlab!73302 (merged) tried
allowing clients to send an unlimited number of keepalive requests, up
from the default limit of 2. However, this has led to Gitaly sending GOAWAY
messages to clients, causing other RPCs to fail, so we have reverted it.
This commit takes lowers the keepalive interval to 5 minutes on the server-side, which should preserve the connection while avoiding excessive ping errors as gRPC clients have no keepalive limits.
Closes #4007 (closed)