From b90a64e2a63f40ed164b1eeb4c7ca44976a5082f Mon Sep 17 00:00:00 2001 From: TwinProduction Date: Fri, 16 Jul 2021 20:17:02 -0400 Subject: [PATCH] Set synchronous PRAGMA instruction to NORMAL --- storage/store/database/database.go | 1 + 1 file changed, 1 insertion(+) diff --git a/storage/store/database/database.go b/storage/store/database/database.go index 455d641a..df195e71 100644 --- a/storage/store/database/database.go +++ b/storage/store/database/database.go @@ -62,6 +62,7 @@ func NewStore(driver, path string) (*Store, error) { if driver == "sqlite" { _, _ = store.db.Exec("PRAGMA foreign_keys=ON") _, _ = store.db.Exec("PRAGMA journal_mode=WAL") + _, _ = store.db.Exec("PRAGMA synchronous=NORMAL") // Prevents driver from running into "database is locked" errors // This is because we're using WAL to improve performance store.db.SetMaxOpenConns(1)