From 84b287cc3ca277189d736ef6c2aab9a9cd9ddbe3 Mon Sep 17 00:00:00 2001 From: cskh Date: Mon, 21 Nov 2022 11:42:32 -0500 Subject: [PATCH] fix(peering): increase the gRPC limit to 50MB --- agent/consul/leader_peering.go | 2 +- agent/grpc-internal/client.go | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/agent/consul/leader_peering.go b/agent/consul/leader_peering.go index 602e311df8..8f12ecdcdc 100644 --- a/agent/consul/leader_peering.go +++ b/agent/consul/leader_peering.go @@ -360,7 +360,7 @@ func (s *Server) establishStream(ctx context.Context, // send keepalive pings even if there is no active streams PermitWithoutStream: true, }), - grpc.WithDefaultCallOptions(grpc.MaxCallSendMsgSize(50 * 1024 * 1024)), + grpc.WithDefaultCallOptions(grpc.MaxCallSendMsgSize(50*1024*1024), grpc.MaxCallRecvMsgSize(50*1024*1024)), } logger.Trace("dialing peer", "addr", addr) diff --git a/agent/grpc-internal/client.go b/agent/grpc-internal/client.go index dfeb3dbb20..340a67cb68 100644 --- a/agent/grpc-internal/client.go +++ b/agent/grpc-internal/client.go @@ -148,7 +148,9 @@ func (c *ClientConnPool) dial(datacenter string, serverType string) (*grpc.Clien grpc.WithKeepaliveParams(keepalive.ClientParameters{ Time: 30 * time.Second, Timeout: 10 * time.Second, - })) + }), + grpc.WithDefaultCallOptions(grpc.MaxCallSendMsgSize(50*1024*1024), grpc.MaxCallRecvMsgSize(50*1024*1024)), + ) if err != nil { return nil, err }