Skip to content

Commit 9a807f7

Browse files
committed
db.d: set busy_timeout to 10 seconds
This allows SQLite to wait instead of returning a SQLITE_BUSY error if multiple processes attempt to write at once.
1 parent 7135be1 commit 9a807f7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/db.d

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ final class Database
115115
query("PRAGMA synchronous = NORMAL;");
116116
query("PRAGMA foreign_keys = ON;");
117117
query("PRAGMA secure_delete = ON;");
118+
query("PRAGMA busy_timeout = 10000;"); // 10 seconds
118119

119120
enum users_table_sql = text(
120121
"CREATE TABLE IF NOT EXISTS ", users_table,

0 commit comments

Comments
 (0)