summaryrefslogtreecommitdiffstats
path: root/buf.yaml
diff options
context:
space:
mode:
authorbndw <ben@bdw.to>2026-02-14 09:44:55 -0800
committerbndw <ben@bdw.to>2026-02-14 09:44:55 -0800
commitfe3708eaf495613cc6e2340b821795f25811d6ed (patch)
tree061f4b1c2938919ab38e0bc840c34d7c35bad42f /buf.yaml
parent688548d4ac3293449a88913275f886fd2e103cdf (diff)
fix: optimize SQLite connection pooling for single-writer architecture
Remove misleading max_connections config option and properly configure SQLite connection pooling in the storage layer. Changes: - Set MaxOpenConns(1) for optimal SQLite performance - Set MaxIdleConns(1) to keep connection alive - Set ConnMaxLifetime(0) to never close connection - Remove max_connections and max_lifetime from DatabaseConfig - Update docs to clarify SQLite's single-writer architecture Rationale: SQLite is an embedded database with a single-writer lock. Multiple connections cause lock contention and reduce performance. WAL mode allows concurrent reads from the same connection, making connection pooling unnecessary and counterproductive. This change makes the configuration clearer and ensures optimal SQLite performance by using a single long-lived connection.
Diffstat (limited to 'buf.yaml')
0 files changed, 0 insertions, 0 deletions