From a20a9b96a6f1584a7d3fd70283b0d4269602f048 Mon Sep 17 00:00:00 2001 From: hyponet Date: Sat, 15 Jun 2024 17:31:10 +0800 Subject: [PATCH] update: adjust grpc body max size --- cmd/apps/apis/fsapi/server.go | 1 + cmd/apps/apis/pathmgr/manager.go | 1 + 2 files changed, 2 insertions(+) diff --git a/cmd/apps/apis/fsapi/server.go b/cmd/apps/apis/fsapi/server.go index e12327a4..ad5f32b6 100644 --- a/cmd/apps/apis/fsapi/server.go +++ b/cmd/apps/apis/fsapi/server.go @@ -91,6 +91,7 @@ func New(ctrl controller.Controller, pathEntryMgr *pathmgr.PathManager, cfg conf var opts = []grpc.ServerOption{ grpc.Creds(creds), + grpc.MaxRecvMsgSize(1024 * 1024 * 50), // 50M common.WithCommonInterceptors(), common.WithStreamInterceptors(), } diff --git a/cmd/apps/apis/pathmgr/manager.go b/cmd/apps/apis/pathmgr/manager.go index 324606fb..ca8922b3 100644 --- a/cmd/apps/apis/pathmgr/manager.go +++ b/cmd/apps/apis/pathmgr/manager.go @@ -128,6 +128,7 @@ func (m *PathManager) CreateFile(ctx context.Context, parentDir string, attr typ en, err = m.ctrl.CreateEntry(ctx, parent.ID, attr) if err != nil { + m.logger.Errorw("create file entry failed", "path", entryPath, "err", err) return nil, err } m.logger.Infow("create file entry", "path", entryPath, "entry", en.ID)