diff --git a/api/server/router/grpc/grpc.go b/api/server/router/grpc/grpc.go index 7f26f06b7dae6..a22bc1d6daae3 100644 --- a/api/server/router/grpc/grpc.go +++ b/api/server/router/grpc/grpc.go @@ -9,6 +9,7 @@ import ( "os" "strings" + "github.com/containerd/containerd/defaults" "github.com/containerd/log" "github.com/docker/docker/api/server/router" "github.com/moby/buildkit/util/grpcerrors" @@ -32,6 +33,8 @@ func NewRouter(backends ...Backend) router.Router { grpc.StatsHandler(tracing.ServerStatsHandler(otelgrpc.WithTracerProvider(otel.GetTracerProvider()))), grpc.ChainUnaryInterceptor(unaryInterceptor, grpcerrors.UnaryServerInterceptor), grpc.StreamInterceptor(grpcerrors.StreamServerInterceptor), + grpc.MaxRecvMsgSize(defaults.DefaultMaxRecvMsgSize), + grpc.MaxSendMsgSize(defaults.DefaultMaxSendMsgSize), } r := &grpcRouter{