From 0c5b0257889bf13743fe30f615f9707676ad0bcd Mon Sep 17 00:00:00 2001 From: Dmitrii Stepanov Date: Mon, 26 Jun 2023 18:27:42 +0300 Subject: [PATCH] [#470] grpc: Increase message limits For send message limit set to 2GiB, but there are custom GET/GET RANGE limiters. For receive message limit set to 256 MiB, but actual chunk size will be managed by client. Signed-off-by: Dmitrii Stepanov --- cmd/frostfs-node/grpc.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/frostfs-node/grpc.go b/cmd/frostfs-node/grpc.go index b62ae9c45..1dd0f0729 100644 --- a/cmd/frostfs-node/grpc.go +++ b/cmd/frostfs-node/grpc.go @@ -17,11 +17,13 @@ import ( "google.golang.org/grpc/credentials" ) +const maxRecvMsgSize = 256 << 20 + func initGRPC(c *cfg) { var successCount int grpcconfig.IterateEndpoints(c.appCfg, func(sc *grpcconfig.Config) { serverOpts := []grpc.ServerOption{ - grpc.MaxSendMsgSize(maxMsgSize), + grpc.MaxRecvMsgSize(maxRecvMsgSize), grpc.ChainUnaryInterceptor( metrics.NewUnaryServerInterceptor(), tracing.NewUnaryServerInterceptor(),