SQLITE_BUSY_TIMEOUT
SQLiteERRORNotableLockingofficial confidence

Busy: timeout waiting for lock

Production Risk

Medium — transaction must be retried.

What this means

SQLITE_BUSY_TIMEOUT (773) is returned by the multiplexed VFS (SQLITE_ENABLE_SETLK_TIMEOUT) when a lock wait times out. It distinguishes a timeout from other busy conditions.

Why it happens
  1. 1Lock acquisition timed out because another connection holds the lock.
  2. 2Used with the SQLITE_ENABLE_SETLK_TIMEOUT build option and blocking locks.
How to reproduce

Blocking lock waits in configurations built with SQLITE_ENABLE_SETLK_TIMEOUT.

trigger — this will error
trigger — this will error
# SQLITE_BUSY_TIMEOUT is raised when the OS-level lock wait times out
# Retry logic is the same as SQLITE_BUSY

expected output

sqlite3.OperationalError: database is locked (timeout)

Fix 1

Fix 2

Version notes

Sources
Official documentation ↗

sqlite3.h — SQLITE_BUSY_TIMEOUT = 773

Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev

← All SQLite errors