How to increase message size in grpc using python

前端 未结 3 1624
死守一世寂寞
死守一世寂寞 2021-01-04 10:30

I am using grpc for message passing and am testing a simple server and client. When my message size goes over the limit, I get this error.

grpc._channel._R         


        
3条回答
  •  走了就别回头了
    2021-01-04 11:03

    Changing the message_length for both send and receive will do the trick.

    channel = grpc.insecure_channel(
        'localhost:50051',
        options=[
            ('grpc.max_send_message_length', MAX_MESSAGE_LENGTH),
            ('grpc.max_receive_message_length', MAX_MESSAGE_LENGTH),
        ],
    )
    

提交回复
热议问题