0

I am sending a grpc message over 40 MB, I have set the limit of grpc message size both in client and server-side as follows to take 64 MB still I am getting size limit error?

Client

options = [('grpc.max_send_message_length', 64*1024*1024),
                       ('grpc.max_receive_message_length', 64*1024*1024)]
channel = grpc.secure_channel(channel_endpoint, grpc.ssl_channel_credentials(), options)

Server

choptions = [('grpc.max_send_message_length', 64*1024*1024),
                ('grpc.max_receive_message_length', 64*1024*1024)]
server = grpc.server(futures.ThreadPoolExecutor(max_workers=max_workers), options=choptions)

error encountered :

status = StatusCode.RESOURCE_EXHAUSTED
details = "grpc: received message larger than max (4718167 vs. 4194304)

How to resolve this issue?

1 Answers1

0

From the error message, it looks to be from a Go server rather than a Python server https://github.com/grpc/grpc-go/blob/670c133e568e89c901d05b898af9f5ce72a88c6d/rpc_util.go#L573 as opposed to the error from a Python server which would - https://github.com/grpc/grpc/blob/6b916984a8b167d4bcf9c15e21090be49976ceaa/src/core/ext/filters/message_size/message_size_filter.cc#L206

To fix this, you would need to raise the limits on the Go server too.

Yash Tibrewal
  • 427
  • 2
  • 4