gRPC error transport is closing

Moved from GitHub dgo/25

Posted by Scapal:

I have a Go server exposing a REST API, using Dgraph as my database.

Whenever my server app is idle for too long, I get the following error during my next query or mutation:
rpc error: code = Unavailable desc = transport is closing

If I retry it works again. So it seems the Dgraph server is closing the connection without the dgo client knowing about it.

Is this a dgo problem or a Dgraph bug?
Could dgo retry automatically on such error?

Tested with Dgraph v1.0.9 and v1.0.10

google.golang.org/grpc v1.16.0
github.com/dgraph-io/dgo v0.0.0-20181102011806-23d7ac35e2c7

srfrog commented :

Related: gRPC error after being idle for a while · Issue #2729 · dgraph-io/dgraph · GitHub