From 3c6b29563ff722bf3a7c8d07927dceba2f642c11 Mon Sep 17 00:00:00 2001 From: cryptorugmunch Date: Fri, 3 Jul 2026 17:07:20 +0200 Subject: [PATCH] fix(health): use fresh httpx client per qdrant check to avoid stale connection pool --- app/core/health_route.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/core/health_route.py b/app/core/health_route.py index 00abe3b..0b774b5 100644 --- a/app/core/health_route.py +++ b/app/core/health_route.py @@ -123,10 +123,11 @@ async def _check_neo4j() -> dict[str, Any]: async def _check_qdrant() -> dict[str, Any]: try: - client = await _get_http_client() - resp = await client.get(f'{QDRANT_URL.rstrip(chr(47))}/collections') - data = resp.json() - collections = data.get("result", {}).get("collections", []) + import httpx + async with httpx.AsyncClient(timeout=5.0) as client: + resp = await client.get(f"{QDRANT_URL.rstrip(chr(47))}/collections") + data = resp.json() + collections = data.get("result", {}).get("collections", []) return { "healthy": resp.status_code == 200, "details": {"collection_count": len(collections)},