It looks like we were missing grpc.http2.min_time_between_pings_ms on the Ruby client side. With that set to 10_000 and the previously mentioned config, we're now seeing periodic pings every 11 seconds.
On Thursday, November 16, 2017 at 12:06:44 PM UTC-6, John Hume wrote: > > We're trying to keep connections alive between Ruby grpc clients and a > grpc-java server between unary rpc calls, which sometimes come minutes > apart. Based on > https://github.com/grpc/proposal/blob/master/A8-client-side-keepalive.md, > we think this should be supported with periodic PINGs to ensure a > connection is still good. (Without the changes described below, our > connections sometimes seem to die without the client realizing it, > resulting in "14:Connect Failed" on the next call. This happens especially > often when the next call comes very close to the server's maxConnectionIdle > time after the previous call.) > > On the Ruby client side, we've configured the following. > > "grpc.keepalive_permit_without_calls" => 1, > "grpc.keepalive_time_ms" => 11_000, > > On the Java server side, we've configured the following > (NettyServerBuilder calls). > > .permitKeepAliveWithoutCalls(true) > .permitKeepAliveTime(10, TimeUnit.SECONDS) > > In testing this with debug logging on the server, we see an INBOUND PING > 11 seconds after the first call (followed immediately by an OUTBOUND ack). > Then after another 11 seconds we see an INBOUND SETTINGS (followed by an > outbound ack). Then we see no more pings. We expected to see PINGs every 11 > seconds. > > Is there configuration we're missing to get periodic PINGs between rpc > calls? Have we misunderstood the feature? > -- 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 [email protected]. To post to this group, send email to [email protected]. 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/5a0e5174-cf09-4b98-9327-7f06e409ff0c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
