You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Provider client retry loop blocks event loop with time.sleep #150
Provider client retry loop blocks event loop with time.sleep
Severity: High File:backend/app/llm/provider_client.py:245
The chat method's retry loop uses synchronous time.sleep(backoff) between retry attempts. With exponential backoff and multiple retries, this can block the event loop for tens of seconds, especially when structured output is enabled with longer timeouts.
ifretries<=max_retries:
backoff=self.settings.RETRY_BACKOFF* (2** (retries-1))
logger.warning(
"Provider request failed (attempt %s/%s): %s. Retrying in %ss...",
retries,
max_retries,
e,
backoff,
)
time.sleep(backoff)
Why it matters
A single failing LLM provider can block all concurrent requests across the platform. During provider outages, the entire backend becomes unresponsive.
Activity