From 1e069587febfde09dae04399259f1906148e8449 Mon Sep 17 00:00:00 2001 From: xboard Date: Wed, 11 Mar 2026 07:56:27 +0800 Subject: [PATCH] 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 --- config/database.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/database.php b/config/database.php index 7c0c3ab..1929d5e 100755 --- a/config/database.php +++ b/config/database.php @@ -41,6 +41,9 @@ return [ 'database' => env('DB_DATABASE') ? base_path(env('DB_DATABASE')) : database_path('database.sqlite'), 'prefix' => '', 'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true), + 'busy_timeout' => env('DB_BUSY_TIMEOUT', 30000), + 'journal_mode' => env('DB_JOURNAL_MODE', 'wal'), + 'synchronous' => env('DB_SYNCHRONOUS', 'normal'), ], 'mysql' => [