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
gRPC: can only send message no larger than 2MB eventhough grpc limit is 4MB #2208
Comments
Thanks, the issue is related to these two body fields, we will find a solution. |
A potential solution could be a flag that avoids populating the |
Having an extra field that takes up 50% of the payload just for accommodating format difference seems expensive. Is it possible to inspect the raw_body to see if it's UTF-8? In the meantime, what is the work-around to fully utilize the 4MB limit if our data is UTF-8? Should we leave the body empty and only fill the raw_body? |
We already inspect
I've added a flag that allows you to populate only |
@matiasinsaurralde Thanks for working on the fix for this. Any idea when this will be incorporated into an official release? |
Potential fix for #2208, described [here](#2208 (comment)). Need to add tests.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs, please add comments to this ticket if you would like it to stay open. Thank you for your contributions. |
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
When using a gRPC plugin and sending a message with size 2.5 MB, the request fails with grpc error saying the message exceeded 4MB limit
It looks like the effective payload is only 50% of the defined gRPC Max message size limit (default 4MB.)
Suspecting the new attribute MiniRequestObject.RawBody is what's taking up the other 50% of the max message size.
In the scenario tested below, the payload sent was only 2.5MB but the total size calculated by grpc was 5MB (perhaps 2.5 for Body and another 2.5 for RawBody)
time=“Apr 10 05:04:45” level=error msg=“rpc error: code = 8 desc = grpc: received message larger than max (5097416 vs. 4194304)”
time=“Apr 10 05:04:45” level=error msg=“Dispatch error” error=“rpc error: code = 8 desc = grpc: received message larger than max (5097416 vs. 4194304)”
What is the expected behavior?
We should be able to fully utilize the max message size (be able to send a message with 4MB in size
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
Same scenario as #2203
Which versions of Tyk affected by this issue? Did this work in previous versions of Tyk?
observed in 2.7.4
The text was updated successfully, but these errors were encountered: