From 2b86069f3b37634da61fb591bd36ce0fb0bd64ff Mon Sep 17 00:00:00 2001 From: Steven Date: Sun, 29 Sep 2024 21:58:06 +0800 Subject: [PATCH] chore: update `MaxRecvMsgSize` --- server/server.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/server.go b/server/server.go index a90bc674..02fc6b75 100644 --- a/server/server.go +++ b/server/server.go @@ -4,6 +4,7 @@ import ( "context" "fmt" "log/slog" + "math" "net" "net/http" "time" @@ -74,8 +75,8 @@ func NewServer(ctx context.Context, profile *profile.Profile, store *store.Store rss.NewRSSService(s.Profile, s.Store).RegisterRoutes(rootGroup) grpcServer := grpc.NewServer( - // Override the maximum receiving message size to 100M for uploading large resources. - grpc.MaxRecvMsgSize(100*1024*1024), + // Override the maximum receiving message size to math.MaxInt32 for uploading large resources. + grpc.MaxRecvMsgSize(math.MaxInt32), grpc.ChainUnaryInterceptor( apiv1.NewLoggerInterceptor().LoggerInterceptor, grpcrecovery.UnaryServerInterceptor(),