Re: Go gRPC server keeps connections open even if clients died

2,909 views
Skip to first unread message
Message has been deleted

Qi Zhao

unread,
Jan 12, 2017, 2:28:57 PM1/12/17
to grpc.io, soya...@gmail.com
If the clients dies silently (without sending the TCP RST), the server side connection will stay until TCP user time out is triggered (order of tens of minutes depending on your kernel setup) in the current implementation unless you have a custom dialer to turn on TCP KeepAlive. We are working on a heart-beat mechanism to recycle the server connections in a timely fashion. It is WIP.

On Tuesday, January 10, 2017 at 2:52:01 AM UTC-8, soya...@gmail.com wrote:
Hi,

I have implemented a Go gRPC server for an app backend and see that client connections and the corresponding goroutines are still running even if clients (Android apps) have died. I'm not using methods that stream results from server to client or otherwise.

Is this the expected behaviour?

And if so, is there some kind of way on the Go server code to iterate over client connections and then identify the old idle ones and close them?

Thanks!
Message has been deleted

Qi Zhao

unread,
Jan 12, 2017, 8:11:40 PM1/12/17
to Angel Luis Jimenez Martinez, grpc.io
Yes, you are right. We need that heart-beat mechanism.

On Thu, Jan 12, 2017 at 11:43 AM, Angel Luis Jimenez Martinez <soya...@gmail.com> wrote:
So if I understand correctly tcp user timeout applies to sent data that has not been acknowledged. So in this case maybe it would not apply because the server doesn't send any data to the dead client, am I right?



--
Angel.



--
Thanks,
-Qi

Menghan Li

unread,
Mar 21, 2017, 7:04:47 PM3/21/17
to Angel Luis Jimenez Martinez, grpc.io
Client side keepalive support is merged in https://github.com/grpc/grpc-go/pull/993

Server side support is in review: https://github.com/grpc/grpc-go/pull/1119

--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+unsubscribe@googlegroups.com.
To post to this group, send email to grp...@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/CAFnDmdrwL6tnvPHojQfBt%2BXPiwnbNEHPXXgOcWapzvMsU14FEw%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
Message has been deleted
0 new messages