-
Notifications
You must be signed in to change notification settings - Fork 435
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
Add option to increase max message size #246
Conversation
go/grpcwebproxy/backend.go
Outdated
@@ -30,6 +30,12 @@ var ( | |||
"Whether to ignore TLS verification checks (cert validity, hostname). *DO NOT USE IN PRODUCTION*.", | |||
) | |||
|
|||
flagMaxMsgSize = pflag.Int( | |||
"backend_max_msg_size", | |||
4194304, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make this equivalent to the current max? https://github.com/grpc/grpc-go/blob/v1.8.2/server.go#L54. Also please add a reference to this line on github (i.e., copy this link). Note that the link is for v1.8.2 which is the version we've locked in Gopkg.toml.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean to be explicit as 1024 * 1024 * 4
instead of the product? I'll add the link
go/grpcwebproxy/backend.go
Outdated
flagMaxMsgSize = pflag.Int( | ||
"backend_max_msg_size", | ||
4194304, | ||
"Maximum message size limit. If not specified, the default of 4MB will be used.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
receive size limit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This failed to compile. I think you may need to use gRPC.WithDefaultCallOptions or something like that
Apologies, I still struggled to compile the binary after I've also added some documentation for the option on the README, so we can take care of that while we're at it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice, the README addition is great!
Let's just see how the build goes but the code LGTM. |
I might not be able to immediately use the updated binary, my go won't compile, errors with $GOPATH. Do you know if Travis generates build artifacts? |
I don't think Travis does. It really should not be hard to build if you have go installed already. Have you checked the README in the grpcwebproxy folder? It has a step by step guide. |
Thanks for your contribution! |
I got dep installed, but when I |
😬 this is probably easier to resolve in a chat: there's a gRPC-Web slack you can join and we can debug your setup in there: https://join.slack.com/t/improbable-eng/shared_invite/enQtMzQ1ODcyMzQ5MjM4LWY5ZWZmNGM2ODc5MmViNmQ3ZTA3ZTY3NzQwOTBlMTkzZmIxZTIxODk0OWU3YjZhNWVlNDU3MDlkZGViZjhkMjc |
Adds the option to pass an integer value as the
grpc.WithMaxMsgSize
from https://godoc.org/google.golang.org/grpc#WithMaxMsgSize, https://github.com/grpc/grpc-go/blob/master/dialoptions.go#L147.ref #245