Skip to content

Commit

Permalink
feat(server): Increase max receive message size to 100MB (#200)
Browse files Browse the repository at this point in the history
* feat(server): increase max receive message size to 100MB

* refactor(server): increase MaxRecvMsgSize to 100MB
  • Loading branch information
samcm committed Sep 21, 2023
1 parent 2da39d4 commit 687d680
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,12 @@ func (x *Xatu) startGrpcServer(ctx context.Context) error {
return fmt.Errorf("failed to listen: %v", err)
}

mb100 := 1024 * 1024 * 100

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

0 comments on commit 687d680

Please sign in to comment.