We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1916301 commit 6f8613eCopy full SHA for 6f8613e
1 file changed
sdks/python/apache_beam/utils/multi_process_shared.py
@@ -410,12 +410,20 @@ def connect_manager():
410
self._manager = manager
411
except retryable_exceptions:
412
# The server is no longer good, terminate it if we spawned it.
413
+ if getattr(self, '_life_line', None):
414
+ try:
415
+ self._life_line.close()
416
+ except Exception:
417
+ pass
418
if getattr(self, '_server_process', None) and self._server_process.is_alive():
419
logging.info(
420
"Terminating unresponsive server process %s",
421
self._server_process.pid)
- self._server_process.terminate()
- self._server_process.join()
422
423
+ self._server_process.kill()
424
+ self._server_process.join(timeout=1.0)
425
426
427
if os.path.exists(address_file):
428
os.unlink(address_file)
429
0 commit comments