pgref.dev/sqlite/errors/SQLITE_IOERR_DIR_FSYNC
SQLITE_IOERR_DIR_FSYNCFATALTier 3 — Handle with care⚠️ MEDIUM confidence

I/O error syncing the journal directory

Category: I/O ErrorVersions: 3.0+

🔴 Production Risk Error

Critical — journal durability cannot be guaranteed.

What this means

SQLITE_IOERR_DIR_FSYNC (1290) is returned when an fsync() of the directory containing the database file fails. SQLite syncs the directory to ensure new journal files are durably visible.

Why it happens

  1. 1Hardware failure during directory fsync.
  2. 2Filesystem or OS not supporting directory fsync.

How to reproduce

Transaction commit when the directory containing the database cannot be fsynced.

trigger — this will ERROR
# Appears as disk I/O error during COMMIT on affected systems
sqlite3.DatabaseError: disk I/O error

Fix 1

Why this works

Check disk health with SMART diagnostics.

Fix 2

Why this works

Use a filesystem and OS that supports directory fsync.

Sources

📚 Official docs: https://www.sqlite.org/rescode.html#ioerr_dir_fsync

🔧 Source ref: sqlite3.h — SQLITE_IOERR_DIR_FSYNC = 1290

Confidence assessment

⚠️ MEDIUM confidence

Stable.

See also

⚙️ 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 →