Go's database/sql opens multiple connections by default, but SQLite only supports one concurrent writer. Under concurrent load (e.g. parallel blob uploads to MCR), multiple connections compete for the write lock and exceed busy_timeout, causing transient 500 errors. With WAL mode, a single connection still allows concurrent reads from other processes. Go serializes access through the connection pool, eliminating busy errors entirely. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
5.6 KiB
5.6 KiB