From 449d6486dfd4be8a80d2caf5ff1fa5b58d3bf0c1 Mon Sep 17 00:00:00 2001 From: Valentyn Tymofieiev Date: Fri, 6 Dec 2024 14:10:04 -0800 Subject: [PATCH] Disable keepalive pings. --- sdks/python/apache_beam/runners/worker/channel_factory.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sdks/python/apache_beam/runners/worker/channel_factory.py b/sdks/python/apache_beam/runners/worker/channel_factory.py index 6ad0f7235e9d..5f7db04a4c49 100644 --- a/sdks/python/apache_beam/runners/worker/channel_factory.py +++ b/sdks/python/apache_beam/runners/worker/channel_factory.py @@ -23,8 +23,11 @@ class GRPCChannelFactory(grpc.StreamStreamClientInterceptor): DEFAULT_OPTIONS = [ - ("grpc.keepalive_time_ms", 20000), - ("grpc.keepalive_timeout_ms", 300000), + # Don't send keep-alive pings. They should be disabled by default but + # historically in some cases were still incorrectly sent. + # https://issues.apache.org/jira/browse/BEAM-6258 + ("grpc.keepalive_time_ms", 2**31 - 1), + ("grpc.keepalive_timeout_ms", 2**31 - 1), ] def __init__(self):