SQLite write contention is unbounded #121

closed cmc opened this on 2026-09-03 05:15 UTC · ops store · milestone v1.12.0

Discussion

cmc 2026-09-03 05:15 UTC

internal/store/store.go:28 opens WAL with busy_timeout(5000) and never sets SetMaxOpenConns(1) or serialises writers. The webhook poller, mirror worker, CI scheduler, per-chunk AppendBuildLog (builds.go:163) and event writes all take the write lock independently. The busy timeout hides collisions until load rises, then they surface as intermittent write failures.

Remedy: one write connection with a separate read pool, or a serialised writer.

closed by commit 34360906d0 by cmc: store: writers serialise instead of failing under contention

2026-09-04 15:58 UTC