chore(sqlite): reduce max open connections, keep them open permanently (fixes #10592) (#10596)

chore(sqlite): reduce max open connections, keep them open permanently (fixes #10592)

Reduces connection churn, possibly tickling concurrency bug on Windows.

Signed-off-by: Jakob Borg <jakob@kastelo.net>
This commit is contained in:
Jakob Borg
2026-03-13 12:03:22 +00:00
committed by GitHub
parent 077a7a0378
commit 9ffce6e3ff
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -63,6 +63,7 @@ func openBase(path string, maxConns int, pragmas, schemaScripts, migrationScript
}
sqlDB.SetMaxOpenConns(maxConns)
sqlDB.SetMaxIdleConns(maxConns)
for _, pragma := range pragmas {
if _, err := sqlDB.Exec("PRAGMA " + pragma); err != nil {
+1 -1
View File
@@ -20,7 +20,7 @@ import (
)
const (
maxDBConns = 16
maxDBConns = 6
minDeleteRetention = 24 * time.Hour
)