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/af25f933-48da-40a0-8cc6-dcf7bef03b20%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to