Improve gitaly-ruby client connection handling?
During testing, it seems that each RPC that does a gitaly-ruby call in the backend leads to log messages like this:
2017/09/06 18:19:08 transport: http2Client.notifyError got notified that the client transport was broken EOF.
2017/09/06 18:19:08 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: Error while dialing dial unix /var/folders/70/bla/T/gitaly-ruby123/socket: connect: connection refused"; Reconnecting to {/var/folders/70/bla/T/gitaly-ruby123/socket <nil>}
I suspect this is because in internal/rubyserver we create new grpc.ClientConn instances all the time that we don't Close().
The timing suggests that these messages come when gitaly-ruby shuts down, which happens more often in testing (at the end of the suite) than in production (I hope). In other words I don't know how big the real-world problem is here. But we may want to do something about this.
Something as simple as reusing a single grpc.ClientConn shared across the Gitaly process might be sufficient.