From 0889292fab3ab6665dc6cb2e82650c95c4821585 Mon Sep 17 00:00:00 2001 From: irexyc Date: Fri, 10 Jul 2026 17:34:23 +0800 Subject: [PATCH 1/2] fix false negative for healthy status check --- lmdeploy/turbomind/turbomind.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lmdeploy/turbomind/turbomind.py b/lmdeploy/turbomind/turbomind.py index 5c5a1820ed..a4bd603364 100644 --- a/lmdeploy/turbomind/turbomind.py +++ b/lmdeploy/turbomind/turbomind.py @@ -173,6 +173,7 @@ def __init__(self, self._create_engine() self.session_len = _engine_config.session_len + self.health_executor = ThreadPoolExecutor(max_workers=1) if engine_config.enable_metrics else None def _process_weights(self): """Process weight.""" @@ -419,7 +420,10 @@ def _get_health_status(self) -> dict: async def get_health_status(self) -> dict: """Get backend health status without blocking the event loop.""" - return await asyncio.to_thread(self._get_health_status) + # MultimodalProcessor may submit a large number of tasks to the default thread pool, causing + # the _get_health_status task to be selected after the DEFAULT_PROBE_TIMEOUT has already elapsed. + loop = asyncio.get_running_loop() + return await loop.run_in_executor(self.health_executor, self._get_health_status) def _get_logits(outputs, offset: int): From ad62ba20c4fff19af3ba184c39665298844866d0 Mon Sep 17 00:00:00 2001 From: irexyc Date: Fri, 10 Jul 2026 19:46:56 +0800 Subject: [PATCH 2/2] update --- lmdeploy/turbomind/turbomind.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lmdeploy/turbomind/turbomind.py b/lmdeploy/turbomind/turbomind.py index a4bd603364..47b2207286 100644 --- a/lmdeploy/turbomind/turbomind.py +++ b/lmdeploy/turbomind/turbomind.py @@ -173,7 +173,7 @@ def __init__(self, self._create_engine() self.session_len = _engine_config.session_len - self.health_executor = ThreadPoolExecutor(max_workers=1) if engine_config.enable_metrics else None + self.health_executor = ThreadPoolExecutor(max_workers=1) def _process_weights(self): """Process weight."""