From faf43a22028b3e0bbf6086060960e07864e85e49 Mon Sep 17 00:00:00 2001 From: omgbeez <251408589+omgbeez@users.noreply.github.com> Date: Wed, 3 Jun 2026 22:56:37 -0400 Subject: [PATCH] fix: Disable shared cache on SQLITE, reduces SQLITE locking errors. Per documentation by Sqlite and MS, using `Cache=Shared` is discouraged, especially in combination with WAL. WAL mode is supposed to be the better solution overall, and enabling shared cache changes table locking behaviour increasing errors seen from concurrent actions. --- server/RdtClient.Data/DiConfig.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/RdtClient.Data/DiConfig.cs b/server/RdtClient.Data/DiConfig.cs index bbd49f4..e631af3 100644 --- a/server/RdtClient.Data/DiConfig.cs +++ b/server/RdtClient.Data/DiConfig.cs @@ -14,7 +14,7 @@ public static class DiConfig throw new("Invalid database path found in appSettings"); } - var connectionString = $"Data Source={appSettings.Database.Path};Cache=Shared;Pooling=True;Command Timeout=30"; + var connectionString = $"Data Source={appSettings.Database.Path};Cache=Private;Pooling=True;Command Timeout=30"; services.AddDbContext(options => options.UseSqlite(connectionString)); services.AddScoped();