[P1] No timeouts on external HTTP service calls
Problem
Multiple services make HTTP calls to external dependencies (auth service, backend service, document repository, guardrail service) using aiohttp.ClientSession() and httpx.AsyncClient() without configuring timeouts. A hung or slow dependency can cause the calling service to hang indefinitely, eventually exhausting connection pools and rendering the service unresponsive.
Files
-
dataprep/genieai_dataprep_arangodb.py:145— Auth token fetch: no timeout -
dataprep/genieai_dataprep_arangodb.py:188— Status update: no timeout -
dataprep/genieai_dataprep_arangodb.py:216— Ingestion log write: no timeout -
dataprep/genieai_dataprep_arangodb.py:241— Label fetch: no timeout -
dataprep/genieai_dataprep_arangodb.py:318— Guardrail check: no timeout -
chatqna/genieai_chatqna.py:163— Auth token fetch: no timeout -
chatqna/genieai_chatqna.py:208— User profile fetch: no timeout -
chatqna/genieai_chatqna.py:841— File metadata fetch: no timeout -
http-service/http_service.py:9— All HTTP calls: no timeout
Acceptance Criteria
-
Add timeout=aiohttp.ClientTimeout(total=30)(or similar) to allaiohttp.ClientSession()creation -
Add timeout=httpx.Timeout(30.0)to allhttpx.AsyncClient()creation -
Use environment variables for configurable timeout values -
Add circuit breaker pattern for critical dependencies (auth service)