Skip to content

Commit

Permalink
Merge pull request #423 from ethpandaops/chore/ka-grpc-settings
Browse files Browse the repository at this point in the history
refactor: Update MaxConnectionAge and MaxConnectionAgeGrace values
  • Loading branch information
Savid authored Dec 3, 2024
2 parents 12e9090 + 72fd34a commit 8cd5967
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,12 +284,14 @@ func (x *Xatu) startGrpcServer(ctx context.Context) error {
),
)

// MaxConnectionAge/MaxConnectionAgeGrace should exceed NGINX's grpc_read_timeout and grpc_send_timeout to
// prevent NGINX from terminating connections before the server's age limit is reached.
opts := []grpc.ServerOption{
grpc.MaxRecvMsgSize(mb100),
grpc.KeepaliveParams(keepalive.ServerParameters{
MaxConnectionIdle: 5 * time.Minute,
MaxConnectionAge: 10 * time.Minute,
MaxConnectionAgeGrace: 2 * time.Minute,
MaxConnectionAge: 12 * time.Minute,
MaxConnectionAgeGrace: 3 * time.Minute,
Time: 1 * time.Minute,
Timeout: 15 * time.Second,
}),
Expand Down

0 comments on commit 8cd5967

Please sign in to comment.