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

grpc: received message larger than max #943

Closed
Lyafei opened this issue Jun 10, 2019 · 1 comment
Closed

grpc: received message larger than max #943

Lyafei opened this issue Jun 10, 2019 · 1 comment

Comments

@Lyafei
Copy link

Lyafei commented Jun 10, 2019

help!

{
    "error": "grpc: received message larger than max (4870953 vs. 4194304)",
    "message": "grpc: received message larger than max (4870953 vs. 4194304)",
    "code": 8
}

I have modified the grpc configuration:

grpc.NewServer(grpc.MaxRecvMsgSize(52428800), grpc.MaxSendMsgSize(52428800))

But that doesn't help, right

How do I set the return value size in the grpc-gateway

@johanbrandhorst
Copy link
Collaborator

The value can be configured in the call to register your client, either when creating the grpc.ClientConn or when calling RegisterXServiceHandler. It is a grpc.CallOption: https://godoc.org/google.golang.org/grpc#MaxCallRecvMsgSize, use https://godoc.org/google.golang.org/grpc#WithDefaultCallOptions to configure it for a connection.

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

2 participants