SQLITE_IOERR_READ
SQLiteFATALCriticalI/O Errorofficial confidence
I/O error during file read
Production Risk
Critical — likely hardware failure; restore from backup.
What this means
SQLITE_IOERR_READ (266) is returned when the OS reports an error while reading from the database file. The data read may be incomplete or corrupt.
Why it happens
- 1Hardware failure (failing HDD/SSD).
- 2NFS or network filesystem disconnect mid-read.
- 3Filesystem corruption.
- 4Disk removed or unmounted while database was open.
How to reproduce
sqlite3_step() or any read operation when the OS read() syscall fails.
trigger — this will error
trigger — this will error
# SQLITE_IOERR_READ typically surfaces as: # sqlite3.DatabaseError: disk I/O error
expected output
sqlite3.DatabaseError: disk I/O error
Fix 1
Fix 2
Fix 3
Fix 4
What not to do
✕
Sources
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev