SQLITE_BUSY_TIMEOUT: blocking file lock timed out
A blocking POSIX file lock request in SQLite's VFS layer timed out. Only builds compiled with SQLITE_ENABLE_SETLK_TIMEOUT return it.
- Result code
SQLITE_BUSY_TIMEOUT- Name
773- Category
- Extended result codes
What it means
The SQLite documentation describes SQLITE_BUSY_TIMEOUT (773) as a blocking POSIX advisory file lock request that failed because of a timeout. Blocking locks are only used when SQLite is compiled with SQLITE_ENABLE_SETLK_TIMEOUT, so most applications never see this code; they get plain SQLITE_BUSY when a lock can't be taken.
Common causes
- Another connection held the lock for longer than the configured wait, on a build that uses blocking locks.
How to fix it
-
Handle it like
SQLITE_BUSY: keep write transactions short, use WAL mode, and retry. -
Raise the wait time if the lock holder is expected to take a while.
PRAGMA busy_timeout = 10000;
Related errors
More extended result codes errors
SQLITE_ERROR_MISSING_COLLSEQno such collation sequenceSQLITE_BUSY_RECOVERYanother process is recovering the WALSQLITE_LOCKED_SHAREDCACHErecord locked in shared cacheSQLITE_CONSTRAINT_CHECKCHECK constraint failedSQLITE_ABORT_ROLLBACKstatement aborted by ROLLBACKSQLITE_IOERR_SHORT_READread returned fewer bytesSQLITE_CANTOPEN_ISDIRthe path is a directorySQLITE_READONLY_ROLLBACKhot journal can't be rolled back
The code and message text are from the SQLite result and error codes documentation. Browse the full SQLite error list or search every database error.
Work on SQLite in SQLly
A native SQL client for macOS, Windows and Linux with schema-aware IntelliSense, guardrails for risky statements and clear error messages, for SQLite and the other databases you use.