make max msg size configurable (#745)

This commit is contained in:
abelanger5
2024-07-26 10:58:16 -07:00
committed by GitHub
parent fd947cb5bc
commit aafdd278db
2 changed files with 9 additions and 0 deletions
+6
View File
@@ -259,6 +259,12 @@ func (s *Server) startGRPC() (func() error, error) {
serverOpts = append(serverOpts, grpc.KeepaliveParams(kasp))
serverOpts = append(serverOpts, grpc.MaxRecvMsgSize(
s.config.Runtime.GRPCMaxMsgSize,
), grpc.MaxSendMsgSize(
s.config.Runtime.GRPCMaxMsgSize,
))
grpcServer := grpc.NewServer(serverOpts...)
if s.ingestor != nil {
+3
View File
@@ -72,6 +72,9 @@ type ConfigFileRuntime struct {
// GRPCInsecure controls whether the grpc server is insecure or uses certs
GRPCInsecure bool `mapstructure:"grpcInsecure" json:"grpcInsecure,omitempty" default:"false"`
// GRPCMaxMsgSize is the maximum message size that the grpc server will accept
GRPCMaxMsgSize int `mapstructure:"grpcMaxMsgSize" json:"grpcMaxMsgSize,omitempty" default:"4194304"`
// ShutdownWait is the time between the readiness probe being offline when a shutdown is triggered and the actual start of cleaning up resources.
ShutdownWait time.Duration `mapstructure:"shutdownWait" json:"shutdownWait,omitempty" default:"20s"`