diff --git a/python/paddle_serving_client/__init__.py b/python/paddle_serving_client/__init__.py index 58ae09bc7bb3b4e1239e9eca58e325c981158bff..63f827167de6417a15097d0ea2c7834e7fbf2d20 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_)