SQLITE_FULL: database or disk is full
A write failed because the disk, or the partition used for temporary files, ran out of space, or the database hit its max_page_count limit.
- Result code
SQLITE_FULL- Name
13- Category
- Primary result codes
What it means
SQLITE_FULL (13) means SQLite couldn't finish a write for lack of space. The SQLite documentation points out a common surprise: the space can run out in the temporary directory rather than where the database lives, because large sorts, index builds and VACUUM write temporary files, and the temp partition may be much smaller.
The same code is returned when the database reaches the page limit set with PRAGMA max_page_count.
Common causes
- The disk holding the database, its journal or its WAL file is full.
- The temporary directory is on a small partition (for example a small
/tmp), and a bigORDER BY,CREATE INDEXorVACUUMfilled it. PRAGMA max_page_countcaps the database size.- A WAL file that has grown very large because checkpoints can't complete.
How to fix it
-
Free space on the volume, or move the database to a larger one.
-
Point temporary files at a larger directory with the
SQLITE_TMPDIRorTMPDIRenvironment variable, or keep them in memory if the data fits.PRAGMA temp_store = MEMORY;
-
Check and raise the page limit if one is set.
PRAGMA max_page_count; PRAGMA max_page_count = 2147483646;
-
In WAL mode, run a checkpoint to shrink the WAL once readers are done.
PRAGMA wal_checkpoint(TRUNCATE);
Related errors
SQLITE_IOERRdisk I/O error1105SQL Server: Filegroup is full, cannot allocate9002SQL Server: Transaction log for database is fullORA-01653Oracle: unable to extend table in tablespace
More primary result codes errors
SQLITE_ERRORSQL logic errorSQLITE_PERMaccess permission deniedSQLITE_ABORTquery abortedSQLITE_BUSYdatabase is lockedSQLITE_LOCKEDdatabase table is lockedSQLITE_NOMEMout of memorySQLITE_READONLYattempt to write a readonly databaseSQLITE_INTERRUPTinterrupted
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.