SQLITE_NOLFSERRORTier 2 — Caution⚠️ MEDIUM confidenceLarge file support is disabled
Category: FilesystemVersions: 3.0+
🔴 Production Risk Error
High — writes will fail on affected platform until resolved.
What this means
SQLITE_NOLFS (22) is returned on systems that do not support large files (> 2 GB) when SQLite tries to write beyond the 2 GB limit. Rare on modern 64-bit systems.
Why it happens
- 1SQLite compiled without large file support on a 32-bit system.
- 2Filesystem does not support files larger than 2 GB (FAT32, some older NFS).
- 3Database file growing beyond 2 GB on an unsupported platform.
How to reproduce
Write operations on databases exceeding 2 GB on constrained systems.
trigger — this will ERROR
# On a 32-bit system or FAT32 filesystem:
# INSERT that pushes the database past 2 GB returns SQLITE_NOLFSsqlite3.OperationalError: large file support is disabled
Fix 1
Why this works
Use a 64-bit OS and filesystem (ext4, NTFS, APFS) that supports large files.
Fix 2
Why this works
Recompile SQLite with SQLITE_DISABLE_LFS=0 on 32-bit platforms.
Fix 3
Why this works
Reduce database size by archiving or purging old data.
Sources
📚 Official docs: https://www.sqlite.org/rescode.html#nolfs
🔧 Source ref: sqlite3.h — SQLITE_NOLFS = 22
Confidence assessment
⚠️ MEDIUM confidence
Stable. Rarely seen on modern systems.
See also
🔗 Related errors
⚙️ This error reference was generated with AI assistance and reviewed for accuracy. Examples are provided to illustrate common scenarios and may not cover every case. Always test fixes in a development environment before applying to production. Spotted an error? Suggest a correction →