zylon-ai/private-gpt · error · Errors.Overloaded
OVERLOADED_CONDENSATION_ERROR
OVERLOADED_CONDENSATION_ERROR
Error message
Condensation strategy timed out after {timeout_seconds} seconds What it means
Wrapped as Errors.Overloaded with event_code OVERLOADED_CONDENSATION_ERROR when the condensation strategy's async get_memory() call does not finish within timeout_seconds (enforced via asyncio.wait_for). It signals the backend (typically an LLM summarization call) is too slow or saturated, not that the history is malformed.
Source
Thrown at private_gpt/components/chat/processors/chat_history/memory/tldr_processor.py:195
async def _apply_condensation_strategy(
chat_history: list[ChatMessage],
condense_strategy: BaseMemoryStrategy,
max_length: int,
timeout_seconds: int | None = None,
**kwargs: dict[str, Any],
) -> list[ChatMessage]:
"""Apply the specified condensation strategy to chat history."""
try:
coro = condense_strategy.get_memory(
chat_history=chat_history, max_length=max_length, **kwargs
)
if timeout_seconds is None:
return await coro
return await asyncio.wait_for(coro, timeout=timeout_seconds)
except TimeoutError as e:
raise Errors.Overloaded(
f"Condensation strategy timed out after {timeout_seconds} seconds",
event_code=Errors.Codes.OVERLOADED_CONDENSATION_ERROR,
) from e
View on GitHub (pinned to 4a030776a3)
Solutions
- Increase timeout_seconds to comfortably exceed p99 LLM latency for summarization
- Pass timeout_seconds=None to disable the timeout when condensation is trusted to finish
- Reduce the history size fed to the summarizer (fewer messages = faster call)
- Address backend saturation: more capacity, faster model, or load shedding upstream
Example fix
# before
history = await apply_condense_strategy(
condense_strategy, chat_history, max_length,
timeout_seconds=5,
)
# after
history = await apply_condense_strategy(
condense_strategy, chat_history, max_length,
timeout_seconds=120,
) Defensive patterns
Strategy: retry
Try / catch
try:
history = await apply_condense_strategy(strategy, chat_history, max_length, timeout_seconds=60)
except Errors.Overloaded as e:
if e.event_code == Errors.Codes.OVERLOADED_CONDENSATION_ERROR:
history = await apply_condense_strategy(strategy, chat_history, max_length, timeout_seconds=180)
else:
raise Prevention
- Size timeout_seconds from measured p99 of the summarizer LLM
- Shed load before condensation when the backend is saturated
- Retry with backoff, not immediately, to avoid amplifying overload
When it happens
Trigger: Calling the strategy wrapper with a finite timeout_seconds while condense_strategy.get_memory() (LLM-backed summarization) takes longer; a slow or overloaded LLM endpoint; a huge conversation being summarized in one call.
Common situations: Self-hosted LLM under load; network latency spikes; timeout_seconds set tighter than typical LLM latency; retry storms amplifying backend slowness.
Understand the failure class
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
Related errors
- Server did not become ready within {_HEALTH_TIMEOUT}s
- Unknown condense strategy: {strategy}
- No user messages found in the chat history.
- Maximum number of iterations for condensing exceeded.
- The last user message exceeds the maximum length allowed.
AI-assisted analysis of zylon-ai/private-gpt@4a030776a3 (2026-08-15).
Data as JSON: /api/errors/e62b4019afb01a5e.
Report an issue: GitHub.