Reputation: 444
Please help me I've tried everything already The grps settings are all indicated what else he requires from me
// client
sock, err := grpc.Dial(
config.Parser,
grpc.WithInsecure(),
grpc.WithDefaultCallOptions(
grpc.MaxCallRecvMsgSize(20*1024*1024),
grpc.MaxCallSendMsgSize(20*1024*1024)))
//...
m, err := d.Parser.UpdateSources(
ctx,
movie,
grpc.MaxCallSendMsgSize(10*1024*1024),
grpc.MaxCallRecvMsgSize(10*1024*1024))
grps still swears at a large message and, as you can see from the error, the settings were not applied I also added options on the server
rpc := grpc.NewServer(
grpc.MaxSendMsgSize(1024*1024*20),
grpc.MaxSendMsgSize(1024*1024*20))
result
rpc error: code = ResourceExhausted desc = grpc: received message larger than max (4623947 vs. 4194304)
version grpc v1.41.0
Upvotes: 2
Views: 14238
Reputation: 444
The problem has been resolved.
i missed setting grpc.MaxRecvMsgSize(1024*1024*20)
I wrote twice grpc.MaxSendMsgSize(1024*1024*20)
in server.
Lost all night due to a minor bug(
Upvotes: 3