From 8d0daaeab2c2693c88632fbd7f3fec5817c5600e Mon Sep 17 00:00:00 2001 From: WangXi Date: Tue, 16 Jun 2020 23:21:01 +0800 Subject: [PATCH] set grpc max message to 512MB --- python/paddle_serving_client/__init__.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/python/paddle_serving_client/__init__.py b/python/paddle_serving_client/__init__.py index 58ae09bc..63f82716 100644 --- a/python/paddle_serving_client/__init__.py +++ b/python/paddle_serving_client/__init__.py @@ -391,7 +391,13 @@ class MultiLangClient(object): self._parse_model_config(path) def connect(self, endpoint): - self.channel_ = grpc.insecure_channel(endpoint[0]) #TODO + # https://github.com/tensorflow/serving/issues/1382 + options = [('grpc.max_receive_message_length', 512 * 1024 * 1024), + ('grpc.max_send_message_length', 512 * 1024 * 1024), + ('grpc.max_receive_message_length', 512 * 1024 * 1024)] + + self.channel_ = grpc.insecure_channel( + endpoint[0], options=options) #TODO self.stub_ = multi_lang_general_model_service_pb2_grpc.MultiLangGeneralModelServiceStub( self.channel_) -- GitLab