mirror of
https://github.com/hatchet-dev/hatchet.git
synced 2026-05-06 18:09:49 -05:00
make max msg size configurable (#745)
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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"`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user