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 authored and GitHub committed 2026-03-13 12:03:22 +00:00
1 parent 077a7a0378
commit 9ffce6e3ff
2 files changed
+2 -1

No files matched your search

+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
)