Groups
Groups
Sign in
Groups
Groups
grpc.io
Conversations
About
Send feedback
Help
Python: Can max receive message length be changed?
84 views
Skip to first unread message
Bu Sun Kim
unread,
Oct 14, 2020, 8:10:26 PM
10/14/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to grpc.io
grpc-java appears to have a `maxInboundMessageSize`
https://grpc.github.io/grpc-java/javadoc/io/grpc/ManagedChannelBuilder.html#maxInboundMessageSize-int-
that allows the max inbound message size to be changed.
Is there a similar option for Python?
I see
https://groups.google.com/forum/#!searchin/grpc-io/max$20message$20size$20python%7Csort:date/grpc-io/HPLqOjAq2XI/mWrlGZ8cAgAJ
but it seems to be for max send message size.
Context:
Some requests to the Cloud Text-to-Speech API result in responses that exceed the 4MB default:
https://github.com/googleapis/python-texttospeech/issues/5
Googlers see internal issue 170125537
Lidi Zheng
unread,
Oct 14, 2020, 8:35:06 PM
10/14/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to grpc.io
Yes. You can set the inbound (receiving) message size via a channel argument "grpc.max_receive_message_length" (see
definition
)
Here is an example for how to specify channel arguments:
https://github.com/grpc/grpc/blob/master/examples/python/helloworld/greeter_client_with_options.py#L31
The unit for "grpc.max_receive_message_length" is bytes. If the target limit is 1G, the application can set `("grpc.max_receive_message_length", 1024*1024*1024)` as one of the channel argument.
Reply all
Reply to author
Forward
0 new messages