FULL AI ANALYSIS

gRPC Java server returns HTTP/2 GOAWAY under sustained concurrency when keepalive_time is less than proxy idle timeout

Generated Oct 28, 2026, 9:44:48 AM

Analysis summary

When server sends keepalive PINGs more frequently than the upstream proxy's idle timeout, the proxy may interpret keepalive traffic as activity or, conversely, drop connections it deems idle on its own timeline. If the proxy closes the TCP connection (idle timeout) while the server still expects the connection, the gRPC stack triggers GOAWAY or connection-level errors. Aligning keepalive intervals with proxy timeouts or setting keepalive_permit_without_calls appropriately avoids the mismatch.

Possible causes

Keepalive interval shorter than proxy idle timeout causing proxy-initiated TCP close while server still pings

90%

Proxy interprets gRPC keepalive as idle and enforces closure due to misconfiguration

40%

Server-side grpc-java bug in handling connection resets under heavy stream concurrency

20%

Suggested fixes

1

Diagnostic step 1

Align gRPC keepalive_time to be greater than or equal to the proxy's upstream idle timeout (e.g., set keepalive_time >= proxy_idle + 5s) or increase proxy idle timeout.

2

Diagnostic step 2

Set keepalive_permit_without_calls=false if you only need keepalives during active streams, to avoid pinging idle connections.

3

Diagnostic step 3

Verify with tcpdump that PINGs and proxy timeouts no longer overlap and run load tests to ensure no GOAWAYs are produced.

4

Diagnostic step 4

If proxy changes are not possible, implement HTTP/2 GOAWAY handling in clients to retry idempotent requests transparently.