Error code

SQLite SQLITE_BUSY

SQLITESQLITE_BUSY
Database Error Code· An error code returned by a database server such as PostgreSQL or MySQL.

What it means

database file is locked — another connection holds a shared or reserved lock.

How to fix it

  1. Retry the operation with a short delay using sqlite3_busy_handler or sqlite3_busy_timeout.
  2. Switch to WAL journal mode (PRAGMA journal_mode=WAL) which allows concurrent readers alongside a single writer.
  3. Ensure long-running transactions are committed or rolled back promptly to release locks.

Not affiliated with SQLite. Answer summarized from the manufacturer's manual linked above; consult that source for the authoritative procedure.