Sqlite In Production

Run SQLite reliably as the database of a server or desktop application: set the per-connection pragmas (journal_mode WAL, synchronous NORMAL, busy_timeout, foreign_keys ON, PRAGMA optimize before close), keep one writer and a pool of readers, begin every writing transaction with BEGIN IMMEDIATE because a deferred read-then-write upgrade fails at once and ignores the timeout, work the "database is locked" ladder, stop the WAL file growing behind a long-lived reader, and take backups with the backup API, VACUUM INTO or Litestream instead of copying files. Use for "database is locked", "SQLite WAL file keeps growing", "is SQLite fine for production", "back up a live SQLite database" or "which pragmas should I set". Not for an iOS or Android app's on-device schema migration (on-device-migration-safety), save-file formats (game-save-system), table modelling (schema-design) or one slow statement (sql-performance).

greenblacked Updated
The twenty-nine plugins: coding, family, gamedev, operations, delivery, security, manager, personal, career, design, llm, data, techdocs, assurance, client-apps

File contents

greenblacked/AI commit 76a74f4098

Frequently asked questions

npx get-skill add greenblacked/sqlite-in-production