Go-micro: trying to send message larger than max

Created on 14 Apr 2020  路  1Comment  路  Source: asim/go-micro

hi everybody

I want to call service function with request size about 10mb
so I got error "trying to send message larger than max (9840536 vs. 4194304)"

how to fix that ?

Most helpful comment

ohh I got it

in client:
c := client.DefaultClient
c.Init(grpc.MaxSendMsgSize(10 * 1024 * 1024))

in server:
service.Server().Init(grpc.MaxMsgSize(10 * 1024 * 1024))

>All comments

ohh I got it

in client:
c := client.DefaultClient
c.Init(grpc.MaxSendMsgSize(10 * 1024 * 1024))

in server:
service.Server().Init(grpc.MaxMsgSize(10 * 1024 * 1024))

Was this page helpful?
0 / 5 - 0 ratings