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))