langflow-ai/langflow · error · HTTPException
The database is busy. Please retry the request.
Error message
The database is busy. Please retry the request.
What it means
Error "The database is busy. Please retry the request." thrown in langflow-ai/langflow.
Source
Thrown at src/backend/base/langflow/api/v1/flows.py:440
operation=operation,
)
return await operation()
return await run_with_lock_retry(
update_attempt,
session=session,
description=f"update_flow {flow_id}",
)
except HTTPException:
raise
except Exception as e:
await araise_if_deployment_guard_error_or_skip(
e,
log_message=f"op=update_flow flow_id={flow_id}",
)
if is_database_lock_error(e):
await logger.awarning("op=update_flow flow_id=%s exhausted lock retries", flow_id)
raise HTTPException(
status_code=status.HTTP_503_SERVICE_UNAVAILABLE,
detail=FLOW_UPDATE_BUSY,
headers={"Retry-After": "1"},
) from e
handled_error = _handle_unique_constraint_error(e)
if handled_error.status_code != status.HTTP_500_INTERNAL_SERVER_ERROR:
raise handled_error from e
await logger.aerror("op=update_flow flow_id=%s failed with %s", flow_id, type(e).__name__)
raise HTTPException(
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,
detail=FLOW_UPDATE_FAILED,
) from e
@router.put("/{flow_id}", response_model=FlowRead)
async def upsert_flow(
*,
session: DbSession,View on GitHub (pinned to 976ec789d2)
Solutions
- Retry the request; the database was momentarily locked by another transaction.
- If using SQLite, reduce concurrent write load or switch to PostgreSQL for production.
When it happens
Trigger: Occurs when a database lock/timeout (e.g. SQLite 'database is locked') interrupts a flow write; the request should be retried.
Common situations: See trigger scenarios.
AI-assisted analysis of langflow-ai/langflow@976ec789d2 (2026-08-14).
Data as JSON: /api/errors/b6d5be114ea7a3bf.
Report an issue: GitHub.