Skip to content

Commit

Permalink
refactor(server): increase MaxRecvMsgSize to 100MB
Browse files Browse the repository at this point in the history
  • Loading branch information
samcm committed Sep 21, 2023
1 parent 6914694 commit a6e6658
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,12 +222,12 @@ func (x *Xatu) startGrpcServer(ctx context.Context) error {
return fmt.Errorf("failed to listen: %v", err)
}

mb50 := 1024 * 1024 * 100
mb100 := 1024 * 1024 * 100

opts := []grpc.ServerOption{
grpc.StreamInterceptor(grpc_prometheus.StreamServerInterceptor),
grpc.UnaryInterceptor(grpc_prometheus.UnaryServerInterceptor),
grpc.MaxRecvMsgSize(mb50),
grpc.MaxRecvMsgSize(mb100),
grpc.KeepaliveParams(keepalive.ServerParameters{
MaxConnectionIdle: 5 * time.Minute,
MaxConnectionAge: 10 * time.Minute,
Expand Down

0 comments on commit a6e6658

Please sign in to comment.