Add KeepAlive support
I have a gRPC service (in dart) that provides a rpc method returning a stream of messages.
In some cases, this stream may stay without message during a long time. Without activity on the connection during 2 minutes a Firewall kills the connection and the client has to reconnect.
So it would be great to provide a way to send hearbeat.
This problem seems to be addressed by https://github.com/grpc/grpc/blob/master/doc/keepalive.md
Any workaround meanwhile ?
I get repeated gRPC Error (4, Deadline exceeded) and didn't find a way to keep the connection alive (or trying to reset the connection when encountering this error).
I think we have the same issue aswell. We are currently looking for a workaround but have yet been unsuccessful in finding any implementations.
I've tried setting it up on the server side (in go) by increasing the keepalive timing, default was set to 30s.
s := grpc.NewServer(grpc.KeepaliveParams(keepalive.ServerParameters{
MaxConnectionIdle: 5 * time.Minute,
}))
But this has not been working for us. Are there any updates on this at this time?
This is very important for the Firebase Firestore Dart SDK since the stream may stay without message during a long time.
We have no plans to implement this functionality due to limited bandwidth that our team has. PRs implementing this are welcome though.
Still no plans to implement?
The project is in the same state as stated in https://github.com/grpc/grpc-dart/issues/157#issuecomment-703536505
Any updates on this?
@psypdt see https://github.com/grpc/grpc-dart/issues/157#issuecomment-703536505
our project depends on it . :((((((((((((((( is there other way to solve this problem?
is there other way to solve this problem?
I think the only way to solve it is to implement it and send a PR.
our project depends on it . :((((((((((((((( is there other way to solve this problem?
You can create an easy work around. Add small (empty/ping) message, and create in your code the timer to send it once in awhile.
It is unefficient and small extra work but it works.
our project depends on it . :((((((((((((((( is there other way to solve this problem?
You can create an easy work around. Add small (empty/ping) message, and create in your code the timer to send it once in awhile.
It is unefficient and small extra work but it works.
I do this but its not best and good way for solve it I'm waiting for official update for it.
Maybe when it will reach 100 upvotes gRPC team will decide to take this one 😆
@guyluz11 probably waiting for the 10 years anniversary )
This is waiting for somebody to send a PR or for us to get some resources for active development.
this issue is most liked issue at grpc-dart topic. :( we basely use Grpc and flutter in ours projects.