Skip to content

Commit

Permalink
[Core] [Dashboard] Close GCS channel after health check (ray-project#…
Browse files Browse the repository at this point in the history
…30346)

Fixes one memory leak in dashboard.py by closing the GCS channel after the health check.

The health check was being called by the dashboard in head.py’s GCSHealthCheckThread

Debugged and fixed by @simon-mo
  • Loading branch information
architkulkarni authored Nov 17, 2022
1 parent 303042f commit 3d8c68d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions python/ray/_private/gcs_utils.py
Original file line number Diff line number Diff line change
@@ -121,6 +121,8 @@ def check_health(address: str, timeout=2, skip_version_check=False) -> bool:
except grpc.RpcError:
traceback.print_exc()
return False
finally:
channel.close()
if resp.status.code != GcsCode.OK:
raise RuntimeError(f"GCS running at {address} is unhealthy: {resp.status}")

0 comments on commit 3d8c68d

Please sign in to comment.