sergiitk commented on code in PR #36528:
URL: https://github.com/apache/beam/pull/36528#discussion_r2501689245


##########
sdks/python/apache_beam/utils/subprocess_server.py:
##########
@@ -185,8 +185,28 @@ def start(self):
     try:
       process, endpoint = self.start_process()
       wait_secs = .1
-      channel_options = [("grpc.max_receive_message_length", -1),
-                         ("grpc.max_send_message_length", -1)]
+      channel_options = [
+          ("grpc.max_receive_message_length", -1),
+          ("grpc.max_send_message_length", -1),
+          # Default: 30000ms (30s), increased to 180s to reduce ping frequency
+          ("grpc.keepalive_time_ms", 180000),
+          # Default: 5000ms (5s), increased to 10 minutes for stability
+          ("grpc.keepalive_timeout_ms", 600000),

Review Comment:
   As discussed in another thread, this should be ok for your usage.
   
   Note that without setting `grpc.keepalive_time_ms` in server channel ars, 
the server will send a keepalive ping every 2 hours.
   
   So in the current setup, the server sends a ping every two hours, then waits 
for 10 minutes for client to return the ping



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to