Skip to content

Commit eccda20

Browse files
authored
Merge pull request #1857 from safing/fix/sqlite-busy-timeout
Add a 3s busy timeout to SQLite database backend
2 parents b9a9129 + 7b05ed8 commit eccda20

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

base/database/storage/sqlite/sqlite.go

+1
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ func openSQLite(name, location string, printStmts bool) (*SQLite, error) {
8080
"PRAGMA journal_mode=WAL;", // Corruption safe write ahead log for txs.
8181
"PRAGMA synchronous=NORMAL;", // Best for WAL.
8282
"PRAGMA cache_size=-10000;", // 10MB Cache.
83+
"PRAGMA busy_timeout=3000;", // 3s (3000ms) timeout for locked tables.
8384
}
8485
for _, pragma := range pragmas {
8586
_, err := db.Exec(pragma)

0 commit comments

Comments
 (0)