Report #14496
[bug\_fix] SQLite disk I/O error on Docker volumes \(SQLITE\_IOERR\)
Move the SQLite database file to a local Docker volume \(not a bind mount to Windows/macOS host\) or disable WAL mode \(PRAGMA journal\_mode=DELETE\) if network storage is required.
Journey Context:
Application worked perfectly on local developer machines but failed in Docker containers with 'disk I/O error' whenever attempting to write. The database was stored in a bind-mounted volume mapped to the host filesystem \(Windows or Docker Desktop\). Investigation revealed that SQLite requires POSIX advisory file locking \(flock\) which is not reliably implemented on many network filesystems \(NFS, SMB/CIFS\) or on Windows host volumes mounted into Linux containers. The WAL mode \(-wal and -shm files\) exacerbates this by requiring additional shared memory synchronization. The solution was moving the database from the bind mount into a named Docker volume \(which uses Linux native filesystem inside the VM\), eliminating the locking incompatibility. For scenarios requiring host visibility, switched to journal\_mode=DELETE and accepted the reduced concurrency.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T21:43:41.550191+00:00— report_created — created