From 2b102d51ad357903c502d72c1264fb2f724353f3 Mon Sep 17 00:00:00 2001 From: Nick Hill Date: Sat, 31 May 2025 20:42:23 -0700 Subject: [PATCH] [BugFix] Fix incorrect metrics shutdown error log message (#18992) Signed-off-by: Nick Hill --- vllm/v1/metrics/prometheus.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vllm/v1/metrics/prometheus.py b/vllm/v1/metrics/prometheus.py index f125685353614..a364b286d21b9 100644 --- a/vllm/v1/metrics/prometheus.py +++ b/vllm/v1/metrics/prometheus.py @@ -69,9 +69,13 @@ def unregister_vllm_metrics(): def shutdown_prometheus(): """Shutdown prometheus metrics.""" + + path = _prometheus_multiproc_dir + if path is None: + return try: pid = os.getpid() - multiprocess.mark_process_dead(pid) + multiprocess.mark_process_dead(pid, path) logger.debug("Marked Prometheus metrics for process %d as dead", pid) except Exception as e: logger.error("Error during metrics cleanup: %s", str(e))