mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-01 18:57:24 +00:00
Increases the SQLite busy timeout to 30 seconds
Raises the busy timeout used when opening the SQLite connection from 10 to 30 seconds, so that the Entity Framework connection and the dedicated connections used by the bulk data access operations of Dapper keep retrying for longer instead of failing with database locking errors during concurrent access.
This commit is contained in:
1 parent
e3a2c3a494
commit
8a8bdecc7c
1 file changed
+1
-1
@@ -93,7 +93,7 @@ public class Program
|
||||
SqliteConnection sqliteConnection = new(context.Database.GetDbConnection().ConnectionString);
|
||||
sqliteConnection.Open();
|
||||
using SqliteCommand sqliteCommand = sqliteConnection.CreateCommand();
|
||||
sqliteCommand.CommandText = "PRAGMA journal_mode=WAL; PRAGMA busy_timeout=10000;";
|
||||
sqliteCommand.CommandText = "PRAGMA journal_mode=WAL; PRAGMA busy_timeout=30000;";
|
||||
sqliteCommand.ExecuteNonQuery();
|
||||
sqliteConnection.Close();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user