// SQLite error reference

SQLITE_BUSY_RECOVERY: another process is recovering the WAL

Another process is recovering a WAL-mode database after a crash, so this connection has to wait. It clears once recovery finishes.

Result code
SQLITE_BUSY_RECOVERY
Name
261
Category
Extended result codes
Error message
database is locked

What it means

SQLITE_BUSY_RECOVERY (261) is an extended SQLITE_BUSY code for WAL-mode databases: an operation couldn't continue because another process is busy recovering the database file after a crash. Recovery rebuilds the WAL index from the WAL file and normally takes a moment.

Common causes

  • A process using the database crashed or was killed, and the next connection is recovering the WAL.
  • A very large WAL file, which makes recovery take longer.

How to fix it

  1. Retry after a short wait, or set a busy timeout so SQLite waits for you.

    PRAGMA busy_timeout = 5000;
  2. Keep the WAL small with regular checkpoints, so recovery after a crash is quick.

    PRAGMA wal_checkpoint(TRUNCATE);

Related errors

More extended result codes errors

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.

// fewer errors, faster fixes

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.