Skip to content

Commit

Permalink
Set busy_timeout for concurrent writes
Browse files Browse the repository at this point in the history
  • Loading branch information
Zverik committed Jun 20, 2024
1 parent 741a4cd commit ed4c778
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions www/core.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ function open_db($readonly) {
try {
$mode = $readonly ? SQLITE3_OPEN_READONLY : SQLITE3_OPEN_READWRITE;
$db = new SQLite3(SQLITE_DB, $mode);
$db->busyTimeout(5000);
error_log('Opened db with mode '.$mode.' (readonly: '.$readonly.')');
} catch (Exception) {
$db = new SQLite3(SQLITE_DB);
Expand Down

0 comments on commit ed4c778

Please sign in to comment.