Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit of 4M on outgoing messages #1659

Open
MathieuDutSik opened this issue Mar 14, 2024 · 3 comments
Open

Limit of 4M on outgoing messages #1659

MathieuDutSik opened this issue Mar 14, 2024 · 3 comments

Comments

@MathieuDutSik
Copy link

Bug Report

There is a limit on ongoing messages sent to a server of 4M that we can see in many different implementations.
However, tonic also implements a limitation of 4M on outgoing messages. That limitation is rarer and maybe not justified.

Version

0.11

Platform

Crates

Description

@mladedav
Copy link

For anyone stumbling upon this, you can set your limits directly on the Grpc type like so:

            let grpc = tonic::client::Grpc::new(svc)
                .max_decoding_message_size(usize::MAX)
                .max_encoding_message_size(usize::MAX);

The question here should be whether there should be a default limit and if so whether it should be 4 MiB.

@ajwerner
Copy link
Contributor

ajwerner commented Jun 6, 2024

The question here should be whether there should be a default limit and if so whether it should be 4 MiB.

I don't know if this is worth having open as an issue to ask. Seems like this is the default for all of the implementations, and its configurable. I vote we just close this.

@mladedav
Copy link

mladedav commented Jun 6, 2024

@ajwerner all links you sent are defaults for received messages. Default for size of outgoing messages is -1 in C/C++ and Math.MaxInt32 in Go, I didn't see similar constants in C# and Java.

For me this issue isn't about the default max size of received messages, but about tonic refusing to send large messages because of this limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants