SQLITE_IOERR_SHMSIZE
SQLiteERRORNotableI/O Errorofficial confidence

I/O error resizing WAL shared-memory file

Production Risk

High — WAL writes will fail.

What this means

SQLITE_IOERR_SHMSIZE (4874) is returned when SQLite cannot extend the WAL shared-memory (-shm) file to the required size, usually because of a disk-full condition.

Why it happens
  1. 1Disk full preventing -shm file from being extended.
  2. 2OS error during ftruncate() or write() to the -shm file.
How to reproduce

WAL writes that require extending the -shm file.

trigger — this will error
trigger — this will error
# df -h /path/to/database/  # check if disk is full

expected output

sqlite3.OperationalError: disk I/O error

Fix 1

Fix 2

Sources
Official documentation ↗

sqlite3.h — SQLITE_IOERR_SHMSIZE = 4874

Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev

← All SQLite errors