BerriAI/litellm · error · HTTPException
Concurrent write conflict — please retry
Error message
Concurrent write conflict — please retry
What it means
HTTPException(409) raised after a sequence-number UniqueViolationError persisted through all retry attempts while appending a workflow event inside the transaction: concurrent writers kept claiming the same next sequence_number. It signals a lost race — the client should retry the append.
Source
Thrown at litellm/proxy/management_endpoints/workflow_management_endpoints.py:408
async with prisma_client.db.tx() as tx:
event: object = await tx.litellm_workflowevent.create(data=event_data)
if new_status:
await tx.litellm_workflowrun.update(
where={"run_id": run_id},
data={"status": new_status},
)
return event
except Exception as e:
if UniqueViolationError is not None and isinstance(e, UniqueViolationError):
if attempt == _MAX_SEQUENCE_RETRIES - 1:
verbose_proxy_logger.exception(
"Sequence number collision after %d retries for run %s",
_MAX_SEQUENCE_RETRIES,
run_id,
)
raise HTTPException(
status_code=409,
detail="Concurrent write conflict — please retry",
)
continue
verbose_proxy_logger.exception("Error appending workflow event: %s", e)
raise HTTPException(status_code=500, detail=str(e))
raise HTTPException(status_code=500, detail="Failed to append event") # pragma: no cover
@router.get(
"/v1/workflows/runs/{run_id}/events",
tags=["workflow management"],
dependencies=[Depends(user_api_key_auth)],
)
async def list_workflow_events(
run_id: str,
limit: int = Query(100, ge=1, le=500),View on GitHub (pinned to 77b7c6c40c)
Solutions
- Retry the request; the conflict is transient.
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at litellm/proxy/management_endpoints/workflow_management_endpoints.py:408 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18).
Data as JSON: /api/errors/c9ae7c9835eb9eae.
Report an issue: GitHub.