mirror of
https://github.com/rzuasti/oott.git
synced 2026-07-08 19:21:54 +02:00
Enabling WAL per pooled connection raced several concurrent journal-mode switches when r2d2 eagerly opens the pool at startup, producing transient "disk I/O error" and "database is locked" failures. WAL is a persistent property of the database file, so enable it once in init_db (before the scanners and web server start) and keep only the genuinely per-connection pragmas (busy_timeout, synchronous, foreign_keys) in the pool initializer. Also remove the -wal/-shm sidecars in run.sh: deleting oott.db but leaving a stale write-ahead log behind makes SQLite open the fresh database against an orphaned log and fail with "disk I/O error". Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>