aboutsummaryrefslogtreecommitdiff
path: root/src/Jellyfin.Database
diff options
context:
space:
mode:
authorCody Robibero <cody@robibe.ro>2026-08-07 21:38:59 -0400
committerGitHub <noreply@github.com>2026-08-07 21:38:59 -0400
commitd696cea9bcf12f75c5df1cf5f92b43b943f8a991 (patch)
treeb9079110d441cced53148998853514ac32a8bdae /src/Jellyfin.Database
parente83125c17ce0f1950e8d99c3237fe34c1d841e46 (diff)
parent2a08a30982b261866776f735ff7347e7c428610b (diff)
Merge pull request #17558 from IDisposable/fix/set-cache-to-private
Switch SQLite connection Cache to Private
Diffstat (limited to 'src/Jellyfin.Database')
-rw-r--r--src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/SqliteDatabaseProvider.cs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/SqliteDatabaseProvider.cs b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/SqliteDatabaseProvider.cs
index 044fd0131f..8020fe1f93 100644
--- a/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/SqliteDatabaseProvider.cs
+++ b/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/SqliteDatabaseProvider.cs
@@ -63,7 +63,11 @@ public sealed class SqliteDatabaseProvider : IJellyfinDatabaseProvider
var sqliteConnectionBuilder = new SqliteConnectionStringBuilder
{
DataSource = GetOption(customOptions, "path", e => e, () => Path.Combine(_applicationPaths.DataPath, "jellyfin.db")),
- Cache = GetOption(customOptions, "cache", Enum.Parse<SqliteCacheMode>, () => SqliteCacheMode.Default),
+ // Private, not Default: sqlite3_enable_shared_cache is process-global, so a plugin
+ // enabling it makes these connections share a cache too. Contention then surfaces as
+ // SQLITE_LOCKED ("database table is locked"), which the busy handler does not cover,
+ // so busy_timeout is skipped and the command fails at CommandTimeout instead.
+ Cache = GetOption(customOptions, "cache", Enum.Parse<SqliteCacheMode>, () => SqliteCacheMode.Private),
Pooling = GetOption(customOptions, "pooling", e => e.Equals(bool.TrueString, StringComparison.OrdinalIgnoreCase), () => true),
DefaultTimeout = GetOption(customOptions, "command-timeout", int.Parse, () => 60)
};