mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-11 14:00:29 +00:00
963401ac90
The metrics store capped its SQLite pool at one connection, so every UI history read queued behind every buffered-write commit, and behind the WAL checkpoints those commits pick up at the 4000-page threshold. On write-heavy installs (many Docker agents with churning containers) that serialization presented as sustained 120-260ms COMMIT warnings and an unresponsive UI even with idle CPU and fast disks. Writes were never the risk: flush, rollup, retention, and maintenance already funnel through the single background worker goroutine, and the WriteBatchSync poller path serializes on the WAL write lock via busy_timeout. Raising the pool exposed a second bug: auto_vacuum(INCREMENTAL) in the per-connection DSN pragmas replays as a database-header write whenever the pool opens a new connection, which blocks connection creation behind the active writer for up to the full 30s busy_timeout. auto_vacuum is a persistent database property that migrateAutoVacuum already establishes once at startup, so the per-connection copy is dropped. Refs #1601 Contract-Neutral: behavioral fix: metrics store read concurrency and per-connection auto_vacuum pragma removal, no public contract delta (#1601)