Hi, I’m using golang driver and getting error when load bulk data.
2020/03/04 20:17:17 rpc error: code = ResourceExhausted desc = grpc: received message larger than max (4729171 vs. 4194304)
4194304 = 1024 * 1024 * 4 = 4MB
but, I pushed more than that.
How can I change default max size? There is nothing documentation that mentions about it.
hyunsooda:
4194304
[self-answer]
grpc.WithMaxMsgSize() function can adjust max size and I used it and then solved the problem.
See : change max message size functions name · grpc/grpc-go@d19bbe8 · GitHub
MichelDiz
(Michel Diz)
March 4, 2020, 5:04pm
3
If it is possible, please fill up an issue. So we can add a flag for that.
MichelDiz
(Michel Diz)
March 5, 2020, 10:27pm
4
minor update:
Dgraph’s Max msg is 4GB see the links bellow.
return net.Listen("tcp", fmt.Sprintf("%s:%d", addr, port))
}
func serveGRPC(l net.Listener, tlsCfg *tls.Config, wg *sync.WaitGroup) {
defer wg.Done()
x.RegisterExporters(Alpha.Conf, "dgraph.alpha")
opt := []grpc.ServerOption{
grpc.MaxRecvMsgSize(x.GrpcMaxSize),
grpc.MaxSendMsgSize(x.GrpcMaxSize),
grpc.MaxConcurrentStreams(1000),
grpc.StatsHandler(&ocgrpc.ServerHandler{}),
}
if tlsCfg != nil {
opt = append(opt, grpc.Creds(credentials.NewTLS(tlsCfg)))
}
s := grpc.NewServer(opt...)
api.RegisterDgraphServer(s, &edgraph.Server{})
hapi.RegisterHealthServer(s, health.NewServer())
system
(system)
Closed
April 4, 2020, 10:27pm
5
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.