Skip to content

Commit ad37bb7

Browse files
authored
Send connection keepalive pings once per minute to prevent stream termination while awaiting long-running jobs (#7755)
1 parent 96c2004 commit ad37bb7

File tree

1 file changed

+4
-0
lines changed
  • cirq-google/cirq_google/cloud/quantum_v1alpha1/services/quantum_engine_service/transports

1 file changed

+4
-0
lines changed

cirq-google/cirq_google/cloud/quantum_v1alpha1/services/quantum_engine_service/transports/grpc_asyncio.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,10 @@ def __init__(
299299
options=[
300300
("grpc.max_send_message_length", -1),
301301
("grpc.max_receive_message_length", -1),
302+
# Send connection keepalive pings once per minute
303+
("grpc.keepalive_time_ms", 60 * 1000),
304+
# Allow unlimited keepalive pings in between data frames
305+
('grpc.http2.max_pings_without_data', 0),
302306
],
303307
)
304308

0 commit comments

Comments
 (0)