☆ 17 r/databases ·by Kevin ·2026-10-30 SQLite WAL file keeps growing after writes stop 724 views A small service uses SQLite in WAL mode. The -wal file grows to hundreds of MB and never shrinks. Checkpoints do not seem to help. ⧉ Copy link⚑ Report
☆ 0 A Anna ·2026-10-30#1 WAL only truncates when no reader is holding an old snapshot. Check for a long-lived read transaction or a connection that was never closed. ⧉ Copy link⚑ Report
☆ 0 K Kevin ·2026-10-30#2 There is a background reporting query that stays open. Closing it fixed the growth. Can I force a checkpoint? ⧉ Copy link⚑ Report
☆ 0 D Dan H. ·2026-10-30#3 PRAGMA wal_checkpoint(TRUNCATE) works when no readers block it. Also set wal_autocheckpoint to a sensible page count. ⧉ Copy link⚑ Report
3 replies