Skip to content

Commit 1e06958

Browse files
author
xboard
committed
fix: configure SQLite WAL mode and busy_timeout to prevent database locked errors
- Enable WAL journal mode for concurrent read/write support - Set busy_timeout to 30s to wait on locks instead of failing immediately - Set synchronous to normal for better write performance Fixes #770
1 parent 8bb4682 commit 1e06958

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

config/database.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@
4141
'database' => env('DB_DATABASE') ? base_path(env('DB_DATABASE')) : database_path('database.sqlite'),
4242
'prefix' => '',
4343
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
44+
'busy_timeout' => env('DB_BUSY_TIMEOUT', 30000),
45+
'journal_mode' => env('DB_JOURNAL_MODE', 'wal'),
46+
'synchronous' => env('DB_SYNCHRONOUS', 'normal'),
4447
],
4548

4649
'mysql' => [

0 commit comments

Comments
 (0)