grpc.max_metadata_size

2,923 views
Skip to first unread message

aa...@dropbox.com

unread,
Mar 13, 2018, 6:16:03 AM3/13/18
to grpc.io
Hi,

Had 2 questions regarding using "grpc.max_metadata_size"

1. It was not clear to me that `max_metadata_size` takes into account size of "detail" part of response. Can we allow setting "max_metadata_size" to -1 to represent unlimited as with `max_send_message_length` and `max_receive_message_length`? 

The exception that gets raised (at least from python) when you try and return with details larger then `max_metadata_size` is `(StatusCode.RESOURCE_EXHAUSTED, to-be-sent trailing metadata size exceeds peer limit` which imo is somewhat confusing as I didn't consider "details" to be trailing metadata, and it does not show up under the response call trailing metadata.

2. Is the equivalent of "max_metadata_size" exposed anywhere in grpc-go? As far as I can tell Java does expose it through netty params `maxHeaderListSize`.

Thanks,
Ashwin

Doug Fawley

unread,
Mar 19, 2018, 2:52:29 PM3/19/18
to grpc.io
For #2, Go does not expose or respect any max header size settings.  We do have an issue to start respecting the http2 setting:

Mark D. Roth

unread,
Mar 19, 2018, 3:30:34 PM3/19/18
to aa...@dropbox.com, grpc.io
The max metadata size translates to the HTTP/2 MAX_HEADER_LIST_SIZE setting, defined in https://tools.ietf.org/html/rfc7540#section-6.5.2.  Since the status details are sent as part of trailing metadata, they count toward this size limit.

The HTTP/2 settings value needs to fit in 32 bits, so the closest you can come to setting it to unlimited is to set it to INT32_MAX.

--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+unsubscribe@googlegroups.com.
To post to this group, send email to grp...@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/31385f13-7406-4af5-b124-f511098074f3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Mark D. Roth <ro...@google.com>
Software Engineer
Google, Inc.
Reply all
Reply to author
Forward
0 new messages