GRPC_ARG_HTTP2_MAX_PING_STRIKES in Java

85 views
Skip to first unread message

James M

unread,
Jan 31, 2024, 5:52:17 PMJan 31
to grpc.io
Hi,

In Java, is there a way to override the grpc default value for GRPC_ARG_HTTP2_MAX_PING_STRIKES?

I do not see a method exposed to do this in the ServerBuilder?

Thank you,

Eric Anderson

unread,
Feb 6, 2024, 7:17:35 PMFeb 6
to James M, grpc.io
Java does not have a setting for adjusting the maximum ping strikes. Why do you need to adjust it? Typically adjusting it higher doesn't change whether the connection would get killed. It just delays it a little bit.

--
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+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/2a422e07-f676-45e3-9d41-5a56121876c9n%40googlegroups.com.

James M

unread,
Feb 7, 2024, 5:50:08 PMFeb 7
to grpc.io
Hi Eric,

I am not positive that I need it.  I am trying to run some experiments to debug a race condition I am encountering in one of my unit tests.  The unit test is around asserting graceful shutdown of grpc servers (that requests were accepted and complete within the awaitTerminate timeout).

The exact error I receive is "  io.grpc.StatusRuntimeException: UNAVAILABLE: Connection closed after GOAWAY. HTTP/2 error code: NO_ERROR, debug data: app_requested".

As far as I can tell, this error results from the close method of the Netty Server Handler being called without a Graceful Shutdown set.  There is nothing specifically wrong with that, except that I cant figure out why.

Any tips are appreciated.

Thanks,
James M.

Eric Anderson

unread,
Feb 20, 2024, 10:51:53 AMFeb 20
to James M, grpc.io
Yeah, app_requested looks part of normal server.shutdown() flow. But it probably isn't the true cause of the error. What is probably happening is the RPC isn't completing in time and then you call server.shutdownNow(), which closes the connection. That connection closure is what actually causes the error.

When the connection closes there's not too much error information available. The client ends up saving the earlier GOAWAY (from shutdown()) in hopes it is related to the connection closure and sheds light on debugging.

Reply all
Reply to author
Forward
0 new messages