[gRPC] Fix ping tolerance so long non-streaming RPCs are not dropped (#55102)
Signed-off-by: Wei Gong <wei@together.ai> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
gongwei-130 committed
Sep 24, 2026 at 19:14 UTC
34e104f6fef8620e871e28c4717f7eb4295b7d6c
1 file changed
+12
-4
vllm/entrypoints/launchers/grpc_server.py
+12
-4
@@ -89,10 +89,18 @@ async def serve_grpc(args: argparse.Namespace):
89
options=[
90
("grpc.max_send_message_length", -1),
91
("grpc.max_receive_message_length", -1),
92
- # Tolerate client keepalive pings every 10s (default 300s is too
93
- # strict for non-streaming requests where no DATA frames flow
94
- # during generation)
95
- ("grpc.http2.min_recv_ping_interval_without_data_ms", 10000),
92
+ # A non-streaming Generate writes nothing while the engine
93
+ # decodes, so client keepalive and BDP-probe PINGs arriving in
94
+ # that window are strikes and eventually earn a
95
+ # GOAWAY(ENHANCE_YOUR_CALM, "too_many_pings") that fails every
96
+ # in-flight RPC. Disable the strike count to tolerate them.
97
+ ("grpc.http2.max_ping_strikes", 0),
98
+ # GRPC_ARG_HTTP2_MIN_RECV_PING_INTERVAL_WITHOUT_DATA_MS expands to
99
+ # a string with no "recv", and gRPC Core silently ignores unknown
100
+ # keys, so the misspelt form left the 300s default in force.
101
+ ("grpc.http2.min_ping_interval_without_data_ms", 10000),
102
+ # Without this, gRPC Core widens the floor to a fixed two hours
103
+ # once no streams are open, striking keepalives between requests.
104
("grpc.keepalive_permit_without_calls", True),
105
],
106
)