From 44e8595167c482492d410d7d137dafa09bfb327c Mon Sep 17 00:00:00 2001 From: CharlesPDX Date: Fri, 25 Feb 2022 09:56:18 -0800 Subject: [PATCH] Set message received length to unlimited Enabled unlimited message receive length from gRPC to work around `Received message larger than max` errors. --- python/keepsake/daemon.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python/keepsake/daemon.py b/python/keepsake/daemon.py index 33aa57d0..d6bc3f55 100644 --- a/python/keepsake/daemon.py +++ b/python/keepsake/daemon.py @@ -115,7 +115,10 @@ def __init__(self, project, socket_path=None, debug=False): self.stderr_thread = start_wrapped_pipe(self.process.stderr, sys.stderr) atexit.register(self.cleanup) - self.channel = grpc.insecure_channel("unix://" + self.socket_path) + # set unlimited message received length, + # options from https://github.com/grpc/grpc/blob/v1.44.x/include/grpc/impl/codegen/grpc_types.h + channel_options = [("grpc.max_receive_message_length", -1)] + self.channel = grpc.insecure_channel("unix://" + self.socket_path, options=channel_options) self.stub = DaemonStub(self.channel) TIMEOUT_SEC = 15