Replies: 1 comment
-
The server side also limits things https://docs.rs/tonic/latest/tonic/server/struct.Grpc.html#method.max_encoding_message_size so you may need to also include those settings there as well. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I'm getting the following error when using tonic v0.12.0. I believe the error is due to tonic's restriction of 4MB max encoding/decoding message size.
``Err
value: Status { code: OutOfRange, message: "Error, decoded message length too large: found 7180018 bytes, the limit is: 4194304 bytes", metadata: MetadataMap { headers: {"content-type": "application/grpc", "date": "Mon, 28 Apr 2025 12:31:03 GMT", "content-length": "0"} }, source: None }
.The relevant part of the code is
let response = client.some_grpc_function(tonic::Request::new(some_message).await.unwrap();
where client is my gRPC client defined like
let mut client = MyServiceClient::connect("http://x.x.x.x:50051").await.unwrap()
.I still had the same issue when I tried declaring the client like
let mut client = MyServiceClient::connect("http://x.x.x.x:50051").await.unwrap() .max_encoding_size(5*1024*1024) .max_decoding_size(5*1024*1024)
. Does anyone have a solution? Thanks!Beta Was this translation helpful? Give feedback.
All reactions