SQLITE_INTERRUPT: interrupted
A running statement was stopped by sqlite3_interrupt(), usually because the user or the application cancelled it.
- Result code
SQLITE_INTERRUPT- Name
9- Category
- Primary result codes
What it means
SQLITE_INTERRUPT (9) is what a statement returns after sqlite3_interrupt() was called on its connection. Applications call it to cancel long queries, often from another thread when the user presses Cancel or a timeout fires. If the interrupted statement was a write inside an explicit transaction, the transaction may have been rolled back automatically.
Common causes
- The user cancelled the query in the application.
- The application's own timeout called
sqlite3_interrupt(). - A progress handler that returns non-zero, which also interrupts the statement.
How to fix it
-
If you cancelled on purpose, nothing is wrong. Check whether an open transaction is still active before continuing, and roll it back if you are unsure.
ROLLBACK;
-
If a timeout interrupted a query that should finish, make it faster: check the plan and add an index for the filter or join.
EXPLAIN QUERY PLAN SELECT * FROM orders WHERE customer_id = 42; CREATE INDEX idx_orders_customer ON orders(customer_id);
Related errors
SQLITE_ABORTquery aborted57014PostgreSQL: canceling statement3024MySQL: Maximum statement execution time exceeded3621SQL Server: The statement has been terminated
More primary result codes errors
SQLITE_ERRORSQL logic errorSQLITE_PERMaccess permission deniedSQLITE_BUSYdatabase is lockedSQLITE_LOCKEDdatabase table is lockedSQLITE_NOMEMout of memorySQLITE_READONLYattempt to write a readonly databaseSQLITE_IOERRdisk I/O errorSQLITE_CORRUPTdatabase disk image is malformed
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.