SQLite Error <#>: 'database is locked' #7457

Closed
opened 2026-02-07 04:59:25 +03:00 by OVERLORD · 19 comments
Owner

Originally created by @papavictor on GitHub (Oct 20, 2025).

Description of the bug

Upgrade to 10.11.0 works, as does DB migration. After restarting (and installing the newer LDAP plugin), I attempt to run a Full Library Scan. The application eventually hangs, never reaching more than ~80%, and the logs are full of "SQLite Error (5|6): 'database table is locked'" errors. At startup, I see

[2025-10-20 12:18:55.263 -04:00] [INF] The database locking mode has been set to: NoLock.

This doesn't seem to prevent the database from locking frequently.

Reproduction steps

  1. Upgrade from 10.10.7 to 10.11.0.
  2. Perform the DB migration to completion.
  3. Stop jellyfin server, upgrade LDAP auth from 20 to 21 version.
  4. Start jellyfin, login, and run a Full Library Scan.

What is the current bug behavior?

The application hangs and becomes entirely unresponsive. Restarting Jellyfin allows the application to proceed, but another library scan causes the same issue.

What is the expected correct behavior?

Library scan completes without issue.

Jellyfin Server version

10.10.0+

Specify commit id

No response

Specify unstable release number

No response

Specify version number

10.11.0+deb12

Specify the build version

10.11.0

Environment

- OS: Debian 12
- Linux Kernel: 6.8.12-15-pve
- Virtualization: Proxmox, debian-12-standard (latest)
- Clients: Browser, Kodi
- Browser: Firefox 139
- FFmpeg Version: 7.1.2-3-bookworm
- Playback Method: N/A
- Hardware Acceleration: None
- GPU Model: N/A
- Plugins: Kodi, TMDB, OpenSubtitles, LDAP
- Reverse Proxy: Apache-2.4
- Base URL: https://jellyfin.<mydomain>.com
- Networking: Proxmox LXC
- Jellyfin Data Storage: ext4/LVM
- Media Storage: SSHFS mounted via bind

Jellyfin logs

[2025-10-20 12:44:42.379 -04:00] [INF] Removing item, Type: "Season", Name: "Season 4", Path: "", Id: <uuid>
[2025-10-20 12:44:44.543 -04:00] [INF] Creating Season "Season Unknown" entry for "<tvshow>"
[2025-10-20 12:45:25.415 -04:00] [INF] File changed, pruning extracted data: "/<tvshow>"
[2025-10-20 12:45:25.435 -04:00] [INF] File changed, pruning extracted data: "/<tvshow>"
[2025-10-20 12:45:25.457 -04:00] [INF] File changed, pruning extracted data: "/<tvshow>"
[2025-10-20 12:45:25.477 -04:00] [INF] File changed, pruning extracted data: "/<tvshow>"
[2025-10-20 12:45:25.497 -04:00] [INF] File changed, pruning extracted data: "/<tvshow>"
[2025-10-20 12:45:25.518 -04:00] [INF] File changed, pruning extracted data: "/<tvshow>"
[2025-10-20 12:45:25.548 -04:00] [INF] File changed, pruning extracted data: "/<tvshow>"
[2025-10-20 12:45:25.569 -04:00] [INF] File changed, pruning extracted data: "/<tvshow>"
[2025-10-20 12:45:27.571 -04:00] [INF] File changed, pruning extracted data: "/<tvshow>"
[2025-10-20 12:45:27.594 -04:00] [INF] File changed, pruning extracted data: "/<tvshow>"
[2025-10-20 12:45:27.614 -04:00] [INF] File changed, pruning extracted data: "/<tvshow>"
[2025-10-20 12:45:27.634 -04:00] [INF] File changed, pruning extracted data: "/<tvshow>"
[2025-10-20 12:45:27.654 -04:00] [INF] File changed, pruning extracted data: "/<tvshow>"
[2025-10-20 12:45:27.675 -04:00] [INF] File changed, pruning extracted data: "/<tvshow>"
[2025-10-20 12:45:27.696 -04:00] [INF] File changed, pruning extracted data: "/<tvshow>"
[2025-10-20 12:45:45.853 -04:00] [INF] Removing item, Type: "Video", Name: "<movie>", Path: "/<movie>", Id: <uuid>
[2025-10-20 12:45:56.674 -04:00] [INF] Removing item, Type: "Video", Name: "<movie>", Path: "/<movie>", Id: <uuid>
[2025-10-20 12:45:57.292 -04:00] [INF] Removing item, Type: "Video", Name: "<movie>", Path: "/<movie>", Id: <uuid>
[2025-10-20 12:46:06.431 -04:00] [INF] Started library sync
[2025-10-20 12:46:19.219 -04:00] [INF] Removing item, Type: "Video", Name: "<movie>", Path: "/<movie>", Id: <uuid>
[2025-10-20 12:46:22.350 -04:00] [INF] Library Sync: Added 310 items
[2025-10-20 12:48:40.268 -04:00] [ERR] Error while performing a library operation
Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 6: 'database table is locked'.
   at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()
   at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)
   at Microsoft.Data.Sqlite.SqliteConnectionExtensions.ExecuteNonQuery(SqliteConnection connection, String commandText, SqliteParameter[] parameters)
   at Microsoft.Data.Sqlite.SqliteConnection.BeginTransaction(IsolationLevel isolationLevel, Boolean deferred)
   at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.BeginTransaction(IsolationLevel isolationLevel)
   at Jellyfin.Server.Implementations.Item.BaseItemRepository.UpdateOrInsertItems(IReadOnlyList`1 items, CancellationToken cancellationToken)
   at Emby.Server.Implementations.Library.LibraryManager.UpdateItemsAsync(IReadOnlyList`1 items, BaseItem parent, ItemUpdateType updateReason, CancellationToken cancellationToken)
   at MediaBrowser.Controller.Entities.BaseItem.UpdateToRepositoryAsync(ItemUpdateType updateReason, CancellationToken cancellationToken)
   at MediaBrowser.Providers.Manager.MetadataService`2.SaveItemAsync(MetadataResult`1 result, ItemUpdateType reason, CancellationToken cancellationToken)
   at MediaBrowser.Providers.Manager.MetadataService`2.<RefreshMetadata>g__SaveInternal|36_0(BaseItem item, MetadataRefreshOptions refreshOptions, ItemUpdateType updateType, Boolean isFirstRefresh, Boolean requiresRefresh, MetadataResult`1 metadataResult, CancellationToken cancellationToken)
   at MediaBrowser.Providers.Manager.MetadataService`2.RefreshMetadata(BaseItem item, MetadataRefreshOptions refreshOptions, CancellationToken cancellationToken)
   at MediaBrowser.Controller.Entities.BaseItem.RefreshMetadata(MetadataRefreshOptions options, CancellationToken cancellationToken)
   at MediaBrowser.Controller.Entities.Folder.RefreshChildMetadata(BaseItem child, MetadataRefreshOptions refreshOptions, Boolean recursive, IProgress`1 progress, CancellationToken cancellationToken)
   at MediaBrowser.Controller.LibraryTaskScheduler.LimitedConcurrencyLibraryScheduler.ProcessItem(TaskQueueItem item)
[2025-10-20 12:50:27.836 -04:00] [ERR] Error while performing a library operation
Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 6: 'database table is locked'.
   at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()
   at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)
   at Microsoft.Data.Sqlite.SqliteConnectionExtensions.ExecuteNonQuery(SqliteConnection connection, String commandText, SqliteParameter[] parameters)
   at Microsoft.Data.Sqlite.SqliteConnection.BeginTransaction(IsolationLevel isolationLevel, Boolean deferred)
   at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.BeginTransaction(IsolationLevel isolationLevel)
   at Jellyfin.Server.Implementations.Item.BaseItemRepository.UpdateOrInsertItems(IReadOnlyList`1 items, CancellationToken cancellationToken)
   at Emby.Server.Implementations.Library.LibraryManager.UpdateItemsAsync(IReadOnlyList`1 items, BaseItem parent, ItemUpdateType updateReason, CancellationToken cancellationToken)
   at MediaBrowser.Controller.Entities.BaseItem.UpdateToRepositoryAsync(ItemUpdateType updateReason, CancellationToken cancellationToken)
   at MediaBrowser.Providers.Manager.MetadataService`2.SaveItemAsync(MetadataResult`1 result, ItemUpdateType reason, CancellationToken cancellationToken)
   at MediaBrowser.Providers.Manager.MetadataService`2.<RefreshMetadata>g__SaveInternal|36_0(BaseItem item, MetadataRefreshOptions refreshOptions, ItemUpdateType updateType, Boolean isFirstRefresh, Boolean requiresRefresh, MetadataResult`1 metadataResult, CancellationToken cancellationToken)
   at MediaBrowser.Providers.Manager.MetadataService`2.RefreshMetadata(BaseItem item, MetadataRefreshOptions refreshOptions, CancellationToken cancellationToken)
   at MediaBrowser.Controller.Entities.BaseItem.RefreshMetadata(MetadataRefreshOptions options, CancellationToken cancellationToken)
   at MediaBrowser.Controller.Entities.Folder.RefreshChildMetadata(BaseItem child, MetadataRefreshOptions refreshOptions, Boolean recursive, IProgress`1 progress, CancellationToken cancellationToken)
   at MediaBrowser.Controller.LibraryTaskScheduler.LimitedConcurrencyLibraryScheduler.ProcessItem(TaskQueueItem item)
[2025-10-20 12:51:34.876 -04:00] [ERR] Error while performing a library operation
Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 6: 'database table is locked'.
   at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()
   at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)
   at Microsoft.Data.Sqlite.SqliteConnectionExtensions.ExecuteNonQuery(SqliteConnection connection, String commandText, SqliteParameter[] parameters)
   at Microsoft.Data.Sqlite.SqliteConnection.BeginTransaction(IsolationLevel isolationLevel, Boolean deferred)
   at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.BeginTransaction(IsolationLevel isolationLevel)
   at Jellyfin.Server.Implementations.Item.BaseItemRepository.UpdateOrInsertItems(IReadOnlyList`1 items, CancellationToken cancellationToken)
   at Emby.Server.Implementations.Library.LibraryManager.UpdateItemsAsync(IReadOnlyList`1 items, BaseItem parent, ItemUpdateType updateReason, CancellationToken cancellationToken)
   at MediaBrowser.Controller.Entities.BaseItem.UpdateToRepositoryAsync(ItemUpdateType updateReason, CancellationToken cancellationToken)
   at MediaBrowser.Providers.Manager.MetadataService`2.SaveItemAsync(MetadataResult`1 result, ItemUpdateType reason, CancellationToken cancellationToken)
   at MediaBrowser.Providers.Manager.MetadataService`2.<RefreshMetadata>g__SaveInternal|36_0(BaseItem item, MetadataRefreshOptions refreshOptions, ItemUpdateType updateType, Boolean isFirstRefresh, Boolean requiresRefresh, MetadataResult`1 metadataResult, CancellationToken cancellationToken)
   at MediaBrowser.Providers.Manager.MetadataService`2.RefreshMetadata(BaseItem item, MetadataRefreshOptions refreshOptions, CancellationToken cancellationToken)
   at MediaBrowser.Controller.Entities.BaseItem.RefreshMetadata(MetadataRefreshOptions options, CancellationToken cancellationToken)
   at MediaBrowser.Controller.Entities.Folder.RefreshChildMetadata(BaseItem child, MetadataRefreshOptions refreshOptions, Boolean recursive, IProgress`1 progress, CancellationToken cancellationToken)
   at MediaBrowser.Controller.LibraryTaskScheduler.LimitedConcurrencyLibraryScheduler.ProcessItem(TaskQueueItem item)
[2025-10-20 13:02:12.784 -04:00] [ERR] Failed executing DbCommand ("32,998"ms) [Parameters=["@p10='?' (DbType = Int32), @p0='?' (Size = 32), @p1='?' (Size = 12), @p2='?' (Size = 7), @p3='?' (DbType = DateTime), @p4='?' (DbType = DateTime), @p5='?' (DbType = DateTime), @p6='?' (Size = 112), @p7='?' (Size = 7), @p8='?>
""UPDATE \"Devices\" SET \"AccessToken\" = @p0, \"AppName\" = @p1, \"AppVersion\" = @p2, \"DateCreated\" = @p3, \"DateLastActivity\" = @p4, \"DateModified\" = @p5, \"DeviceId\" = @p6, \"DeviceName\" = @p7, \"IsActive\" = @p8, \"UserId\" = @p9
WHERE \"Id\" = @p10;
SELECT changes();"
[2025-10-20 13:02:12.789 -04:00] [ERR] An exception occurred in the database while saving changes for context type '"Jellyfin.Database.Implementations.JellyfinDbContext"'."
""Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details.
 ---> Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'database is locked'.
   at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()
   at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)
   at Microsoft.Data.Sqlite.SqliteCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Storage.RelationalDatabase.SaveChangesAsync(IList`1 entries, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)"
Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details.
 ---> Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'database is locked'.
   at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()
   at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)
   at Microsoft.Data.Sqlite.SqliteCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Storage.RelationalDatabase.SaveChangesAsync(IList`1 entries, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Jellyfin.Database.Implementations.JellyfinDbContext.<>c__DisplayClass62_0.<<SaveChangesAsync>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at Jellyfin.Database.Implementations.Locking.NoLockBehavior.OnSaveChangesAsync(JellyfinDbContext context, Func`1 saveChanges)
   at Jellyfin.Database.Implementations.JellyfinDbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
[2025-10-20 13:02:12.790 -04:00] [ERR] Error trying to save changes.
Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details.
 ---> Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'database is locked'.
   at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()
   at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)
   at Microsoft.Data.Sqlite.SqliteCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Storage.RelationalDatabase.SaveChangesAsync(IList`1 entries, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Jellyfin.Database.Implementations.JellyfinDbContext.<>c__DisplayClass62_0.<<SaveChangesAsync>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at Jellyfin.Database.Implementations.Locking.NoLockBehavior.OnSaveChangesAsync(JellyfinDbContext context, Func`1 saveChanges)
   at Jellyfin.Database.Implementations.JellyfinDbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Jellyfin.Server.Implementations.Devices.DeviceManager.UpdateDevice(Device device)
   at Jellyfin.Server.Implementations.Devices.DeviceManager.UpdateDevice(Device device)
   at Jellyfin.Server.Implementations.Security.AuthorizationContext.GetAuthorizationInfoFromDictionary(Dictionary`2 auth, IHeaderDictionary headers, IQueryCollection queryString)
   at Jellyfin.Server.Implementations.Security.AuthorizationContext.GetAuthorizationInfoFromDictionary(Dictionary`2 auth, IHeaderDictionary headers, IQueryCollection queryString)
   at Jellyfin.Server.Implementations.Security.AuthorizationContext.GetAuthorizationInfo(HttpRequest requestContext)
   at Emby.Server.Implementations.HttpServer.Security.AuthService.Authenticate(HttpRequest request)
   at Jellyfin.Api.Auth.CustomAuthenticationHandler.HandleAuthenticateAsync()
   at Microsoft.AspNetCore.Authentication.AuthenticationHandler`1.AuthenticateAsync()
   at Microsoft.AspNetCore.Authentication.AuthenticationService.AuthenticateAsync(HttpContext context, String scheme)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Jellyfin.Api.Middleware.RobotsRedirectionMiddleware.Invoke(HttpContext httpContext)
   at Jellyfin.Api.Middleware.LegacyEmbyRouteRewriteMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context)
   at Jellyfin.Api.Middleware.ResponseTimeMiddleware.Invoke(HttpContext context, IServerConfigurationManager serverConfigurationManager)
   at Jellyfin.Api.Middleware.ExceptionMiddleware.Invoke(HttpContext context)
[2025-10-20 13:02:12.897 -04:00] [ERR] Error processing request. URL "GET" "/ScheduledTasks".
Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details.
 ---> Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'database is locked'.
   at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()
   at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)
   at Microsoft.Data.Sqlite.SqliteCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Storage.RelationalDatabase.SaveChangesAsync(IList`1 entries, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Jellyfin.Database.Implementations.JellyfinDbContext.<>c__DisplayClass62_0.<<SaveChangesAsync>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at Jellyfin.Database.Implementations.Locking.NoLockBehavior.OnSaveChangesAsync(JellyfinDbContext context, Func`1 saveChanges)
   at Jellyfin.Database.Implementations.JellyfinDbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Jellyfin.Server.Implementations.Devices.DeviceManager.UpdateDevice(Device device)
   at Jellyfin.Server.Implementations.Devices.DeviceManager.UpdateDevice(Device device)
   at Jellyfin.Server.Implementations.Security.AuthorizationContext.GetAuthorizationInfoFromDictionary(Dictionary`2 auth, IHeaderDictionary headers, IQueryCollection queryString)
   at Jellyfin.Server.Implementations.Security.AuthorizationContext.GetAuthorizationInfoFromDictionary(Dictionary`2 auth, IHeaderDictionary headers, IQueryCollection queryString)
   at Jellyfin.Server.Implementations.Security.AuthorizationContext.GetAuthorizationInfo(HttpRequest requestContext)
   at Emby.Server.Implementations.HttpServer.Security.AuthService.Authenticate(HttpRequest request)
   at Jellyfin.Api.Auth.CustomAuthenticationHandler.HandleAuthenticateAsync()
   at Microsoft.AspNetCore.Authentication.AuthenticationHandler`1.AuthenticateAsync()
   at Microsoft.AspNetCore.Authentication.AuthenticationService.AuthenticateAsync(HttpContext context, String scheme)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Jellyfin.Api.Middleware.RobotsRedirectionMiddleware.Invoke(HttpContext httpContext)
   at Jellyfin.Api.Middleware.LegacyEmbyRouteRewriteMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context)
   at Jellyfin.Api.Middleware.ResponseTimeMiddleware.Invoke(HttpContext context, IServerConfigurationManager serverConfigurationManager)
   at Jellyfin.Api.Middleware.ExceptionMiddleware.Invoke(HttpContext context)
[2025-10-20 13:04:16.513 -04:00] [ERR] Failed executing DbCommand ("30,504"ms) [Parameters=["@p10='?' (DbType = Int32), @p0='?' (Size = 32), @p1='?' (Size = 4), @p2='?' (Size = 9), @p3='?' (DbType = DateTime), @p4='?' (DbType = DateTime), @p5='?' (DbType = DateTime), @p6='?' (Size = 36), @p7='?' (Size = 6), @p8='?' >
""UPDATE \"Devices\" SET \"AccessToken\" = @p0, \"AppName\" = @p1, \"AppVersion\" = @p2, \"DateCreated\" = @p3, \"DateLastActivity\" = @p4, \"DateModified\" = @p5, \"DeviceId\" = @p6, \"DeviceName\" = @p7, \"IsActive\" = @p8, \"UserId\" = @p9
WHERE \"Id\" = @p10;
SELECT changes();"
[2025-10-20 13:04:16.514 -04:00] [ERR] An exception occurred in the database while saving changes for context type '"Jellyfin.Database.Implementations.JellyfinDbContext"'."
""Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details.
 ---> Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'database is locked'.
   at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()
   at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)
   at Microsoft.Data.Sqlite.SqliteCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Storage.RelationalDatabase.SaveChangesAsync(IList`1 entries, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)"
Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details.
 ---> Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'database is locked'.
   at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()
   at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)
   at Microsoft.Data.Sqlite.SqliteCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Storage.RelationalDatabase.SaveChangesAsync(IList`1 entries, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Jellyfin.Database.Implementations.JellyfinDbContext.<>c__DisplayClass62_0.<<SaveChangesAsync>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at Jellyfin.Database.Implementations.Locking.NoLockBehavior.OnSaveChangesAsync(JellyfinDbContext context, Func`1 saveChanges)
   at Jellyfin.Database.Implementations.JellyfinDbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
[2025-10-20 13:04:16.515 -04:00] [ERR] Error trying to save changes.
Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details.
 ---> Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'database is locked'.
   at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()
   at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)
   at Microsoft.Data.Sqlite.SqliteCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Storage.RelationalDatabase.SaveChangesAsync(IList`1 entries, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Jellyfin.Database.Implementations.JellyfinDbContext.<>c__DisplayClass62_0.<<SaveChangesAsync>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at Jellyfin.Database.Implementations.Locking.NoLockBehavior.OnSaveChangesAsync(JellyfinDbContext context, Func`1 saveChanges)
   at Jellyfin.Database.Implementations.JellyfinDbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Jellyfin.Server.Implementations.Devices.DeviceManager.UpdateDevice(Device device)
   at Jellyfin.Server.Implementations.Devices.DeviceManager.UpdateDevice(Device device)
   at Jellyfin.Server.Implementations.Security.AuthorizationContext.GetAuthorizationInfoFromDictionary(Dictionary`2 auth, IHeaderDictionary headers, IQueryCollection queryString)
   at Jellyfin.Server.Implementations.Security.AuthorizationContext.GetAuthorizationInfoFromDictionary(Dictionary`2 auth, IHeaderDictionary headers, IQueryCollection queryString)
   at Jellyfin.Server.Implementations.Security.AuthorizationContext.GetAuthorizationInfo(HttpRequest requestContext)
   at Emby.Server.Implementations.HttpServer.Security.AuthService.Authenticate(HttpRequest request)
   at Jellyfin.Api.Auth.CustomAuthenticationHandler.HandleAuthenticateAsync()
   at Microsoft.AspNetCore.Authentication.AuthenticationHandler`1.AuthenticateAsync()
   at Microsoft.AspNetCore.Authentication.AuthenticationService.AuthenticateAsync(HttpContext context, String scheme)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Jellyfin.Api.Middleware.RobotsRedirectionMiddleware.Invoke(HttpContext httpContext)
   at Jellyfin.Api.Middleware.LegacyEmbyRouteRewriteMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context)
   at Jellyfin.Api.Middleware.ResponseTimeMiddleware.Invoke(HttpContext context, IServerConfigurationManager serverConfigurationManager)
   at Jellyfin.Api.Middleware.ExceptionMiddleware.Invoke(HttpContext context)
[2025-10-20 13:04:16.516 -04:00] [ERR] Error processing request. URL "GET" "/Users/<uuid>/Items".
Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details.
 ---> Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'database is locked'.
   at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()
   at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)
   at Microsoft.Data.Sqlite.SqliteCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Storage.RelationalDatabase.SaveChangesAsync(IList`1 entries, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Jellyfin.Database.Implementations.JellyfinDbContext.<>c__DisplayClass62_0.<<SaveChangesAsync>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at Jellyfin.Database.Implementations.Locking.NoLockBehavior.OnSaveChangesAsync(JellyfinDbContext context, Func`1 saveChanges)
   at Jellyfin.Database.Implementations.JellyfinDbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)
   at Jellyfin.Server.Implementations.Devices.DeviceManager.UpdateDevice(Device device)
   at Jellyfin.Server.Implementations.Devices.DeviceManager.UpdateDevice(Device device)
   at Jellyfin.Server.Implementations.Security.AuthorizationContext.GetAuthorizationInfoFromDictionary(Dictionary`2 auth, IHeaderDictionary headers, IQueryCollection queryString)
   at Jellyfin.Server.Implementations.Security.AuthorizationContext.GetAuthorizationInfoFromDictionary(Dictionary`2 auth, IHeaderDictionary headers, IQueryCollection queryString)
   at Jellyfin.Server.Implementations.Security.AuthorizationContext.GetAuthorizationInfo(HttpRequest requestContext)
   at Emby.Server.Implementations.HttpServer.Security.AuthService.Authenticate(HttpRequest request)
   at Jellyfin.Api.Auth.CustomAuthenticationHandler.HandleAuthenticateAsync()
   at Microsoft.AspNetCore.Authentication.AuthenticationHandler`1.AuthenticateAsync()
   at Microsoft.AspNetCore.Authentication.AuthenticationService.AuthenticateAsync(HttpContext context, String scheme)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Jellyfin.Api.Middleware.RobotsRedirectionMiddleware.Invoke(HttpContext httpContext)
   at Jellyfin.Api.Middleware.LegacyEmbyRouteRewriteMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context)
   at Jellyfin.Api.Middleware.ResponseTimeMiddleware.Invoke(HttpContext context, IServerConfigurationManager serverConfigurationManager)
   at Jellyfin.Api.Middleware.ExceptionMiddleware.Invoke(HttpContext context)
[2025-10-20 13:05:29.821 -04:00] [ERR] Failed executing DbCommand ("38,951"ms) [Parameters=["@p10='?' (DbType = Int32), @p0='?' (Size = 32), @p1='?' (Size = 12), @p2='?' (Size = 7), @p3='?' (DbType = DateTime), @p4='?' (DbType = DateTime), @p5='?' (DbType = DateTime), @p6='?' (Size = 112), @p7='?' (Size = 7), @p8='?>
""UPDATE \"Devices\" SET \"AccessToken\" = @p0, \"AppName\" = @p1, \"AppVersion\" = @p2, \"DateCreated\" = @p3, \"DateLastActivity\" = @p4, \"DateModified\" = @p5, \"DeviceId\" = @p6, \"DeviceName\" = @p7, \"IsActive\" = @p8, \"UserId\" = @p9
WHERE \"Id\" = @p10;
SELECT changes();"

FFmpeg logs


Client / Browser logs

No response

Relevant screenshots or videos

No response

Additional information

No response

Originally created by @papavictor on GitHub (Oct 20, 2025). ### Description of the bug Upgrade to 10.11.0 works, as does DB migration. After restarting (and installing the newer LDAP plugin), I attempt to run a Full Library Scan. The application eventually hangs, never reaching more than ~80%, and the logs are full of "SQLite Error (5|6): 'database table is locked'" errors. At startup, I see [2025-10-20 12:18:55.263 -04:00] [INF] The database locking mode has been set to: NoLock. This doesn't seem to prevent the database from locking frequently. ### Reproduction steps 1. Upgrade from 10.10.7 to 10.11.0. 2. Perform the DB migration to completion. 3. Stop jellyfin server, upgrade LDAP auth from 20 to 21 version. 4. Start jellyfin, login, and run a Full Library Scan. ### What is the current _bug_ behavior? The application hangs and becomes entirely unresponsive. Restarting Jellyfin allows the application to proceed, but another library scan causes the same issue. ### What is the expected _correct_ behavior? Library scan completes without issue. ### Jellyfin Server version 10.10.0+ ### Specify commit id _No response_ ### Specify unstable release number _No response_ ### Specify version number 10.11.0+deb12 ### Specify the build version 10.11.0 ### Environment ```markdown - OS: Debian 12 - Linux Kernel: 6.8.12-15-pve - Virtualization: Proxmox, debian-12-standard (latest) - Clients: Browser, Kodi - Browser: Firefox 139 - FFmpeg Version: 7.1.2-3-bookworm - Playback Method: N/A - Hardware Acceleration: None - GPU Model: N/A - Plugins: Kodi, TMDB, OpenSubtitles, LDAP - Reverse Proxy: Apache-2.4 - Base URL: https://jellyfin.<mydomain>.com - Networking: Proxmox LXC - Jellyfin Data Storage: ext4/LVM - Media Storage: SSHFS mounted via bind ``` ### Jellyfin logs ```shell [2025-10-20 12:44:42.379 -04:00] [INF] Removing item, Type: "Season", Name: "Season 4", Path: "", Id: <uuid> [2025-10-20 12:44:44.543 -04:00] [INF] Creating Season "Season Unknown" entry for "<tvshow>" [2025-10-20 12:45:25.415 -04:00] [INF] File changed, pruning extracted data: "/<tvshow>" [2025-10-20 12:45:25.435 -04:00] [INF] File changed, pruning extracted data: "/<tvshow>" [2025-10-20 12:45:25.457 -04:00] [INF] File changed, pruning extracted data: "/<tvshow>" [2025-10-20 12:45:25.477 -04:00] [INF] File changed, pruning extracted data: "/<tvshow>" [2025-10-20 12:45:25.497 -04:00] [INF] File changed, pruning extracted data: "/<tvshow>" [2025-10-20 12:45:25.518 -04:00] [INF] File changed, pruning extracted data: "/<tvshow>" [2025-10-20 12:45:25.548 -04:00] [INF] File changed, pruning extracted data: "/<tvshow>" [2025-10-20 12:45:25.569 -04:00] [INF] File changed, pruning extracted data: "/<tvshow>" [2025-10-20 12:45:27.571 -04:00] [INF] File changed, pruning extracted data: "/<tvshow>" [2025-10-20 12:45:27.594 -04:00] [INF] File changed, pruning extracted data: "/<tvshow>" [2025-10-20 12:45:27.614 -04:00] [INF] File changed, pruning extracted data: "/<tvshow>" [2025-10-20 12:45:27.634 -04:00] [INF] File changed, pruning extracted data: "/<tvshow>" [2025-10-20 12:45:27.654 -04:00] [INF] File changed, pruning extracted data: "/<tvshow>" [2025-10-20 12:45:27.675 -04:00] [INF] File changed, pruning extracted data: "/<tvshow>" [2025-10-20 12:45:27.696 -04:00] [INF] File changed, pruning extracted data: "/<tvshow>" [2025-10-20 12:45:45.853 -04:00] [INF] Removing item, Type: "Video", Name: "<movie>", Path: "/<movie>", Id: <uuid> [2025-10-20 12:45:56.674 -04:00] [INF] Removing item, Type: "Video", Name: "<movie>", Path: "/<movie>", Id: <uuid> [2025-10-20 12:45:57.292 -04:00] [INF] Removing item, Type: "Video", Name: "<movie>", Path: "/<movie>", Id: <uuid> [2025-10-20 12:46:06.431 -04:00] [INF] Started library sync [2025-10-20 12:46:19.219 -04:00] [INF] Removing item, Type: "Video", Name: "<movie>", Path: "/<movie>", Id: <uuid> [2025-10-20 12:46:22.350 -04:00] [INF] Library Sync: Added 310 items [2025-10-20 12:48:40.268 -04:00] [ERR] Error while performing a library operation Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 6: 'database table is locked'. at Microsoft.Data.Sqlite.SqliteDataReader.NextResult() at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior) at Microsoft.Data.Sqlite.SqliteConnectionExtensions.ExecuteNonQuery(SqliteConnection connection, String commandText, SqliteParameter[] parameters) at Microsoft.Data.Sqlite.SqliteConnection.BeginTransaction(IsolationLevel isolationLevel, Boolean deferred) at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.BeginTransaction(IsolationLevel isolationLevel) at Jellyfin.Server.Implementations.Item.BaseItemRepository.UpdateOrInsertItems(IReadOnlyList`1 items, CancellationToken cancellationToken) at Emby.Server.Implementations.Library.LibraryManager.UpdateItemsAsync(IReadOnlyList`1 items, BaseItem parent, ItemUpdateType updateReason, CancellationToken cancellationToken) at MediaBrowser.Controller.Entities.BaseItem.UpdateToRepositoryAsync(ItemUpdateType updateReason, CancellationToken cancellationToken) at MediaBrowser.Providers.Manager.MetadataService`2.SaveItemAsync(MetadataResult`1 result, ItemUpdateType reason, CancellationToken cancellationToken) at MediaBrowser.Providers.Manager.MetadataService`2.<RefreshMetadata>g__SaveInternal|36_0(BaseItem item, MetadataRefreshOptions refreshOptions, ItemUpdateType updateType, Boolean isFirstRefresh, Boolean requiresRefresh, MetadataResult`1 metadataResult, CancellationToken cancellationToken) at MediaBrowser.Providers.Manager.MetadataService`2.RefreshMetadata(BaseItem item, MetadataRefreshOptions refreshOptions, CancellationToken cancellationToken) at MediaBrowser.Controller.Entities.BaseItem.RefreshMetadata(MetadataRefreshOptions options, CancellationToken cancellationToken) at MediaBrowser.Controller.Entities.Folder.RefreshChildMetadata(BaseItem child, MetadataRefreshOptions refreshOptions, Boolean recursive, IProgress`1 progress, CancellationToken cancellationToken) at MediaBrowser.Controller.LibraryTaskScheduler.LimitedConcurrencyLibraryScheduler.ProcessItem(TaskQueueItem item) [2025-10-20 12:50:27.836 -04:00] [ERR] Error while performing a library operation Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 6: 'database table is locked'. at Microsoft.Data.Sqlite.SqliteDataReader.NextResult() at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior) at Microsoft.Data.Sqlite.SqliteConnectionExtensions.ExecuteNonQuery(SqliteConnection connection, String commandText, SqliteParameter[] parameters) at Microsoft.Data.Sqlite.SqliteConnection.BeginTransaction(IsolationLevel isolationLevel, Boolean deferred) at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.BeginTransaction(IsolationLevel isolationLevel) at Jellyfin.Server.Implementations.Item.BaseItemRepository.UpdateOrInsertItems(IReadOnlyList`1 items, CancellationToken cancellationToken) at Emby.Server.Implementations.Library.LibraryManager.UpdateItemsAsync(IReadOnlyList`1 items, BaseItem parent, ItemUpdateType updateReason, CancellationToken cancellationToken) at MediaBrowser.Controller.Entities.BaseItem.UpdateToRepositoryAsync(ItemUpdateType updateReason, CancellationToken cancellationToken) at MediaBrowser.Providers.Manager.MetadataService`2.SaveItemAsync(MetadataResult`1 result, ItemUpdateType reason, CancellationToken cancellationToken) at MediaBrowser.Providers.Manager.MetadataService`2.<RefreshMetadata>g__SaveInternal|36_0(BaseItem item, MetadataRefreshOptions refreshOptions, ItemUpdateType updateType, Boolean isFirstRefresh, Boolean requiresRefresh, MetadataResult`1 metadataResult, CancellationToken cancellationToken) at MediaBrowser.Providers.Manager.MetadataService`2.RefreshMetadata(BaseItem item, MetadataRefreshOptions refreshOptions, CancellationToken cancellationToken) at MediaBrowser.Controller.Entities.BaseItem.RefreshMetadata(MetadataRefreshOptions options, CancellationToken cancellationToken) at MediaBrowser.Controller.Entities.Folder.RefreshChildMetadata(BaseItem child, MetadataRefreshOptions refreshOptions, Boolean recursive, IProgress`1 progress, CancellationToken cancellationToken) at MediaBrowser.Controller.LibraryTaskScheduler.LimitedConcurrencyLibraryScheduler.ProcessItem(TaskQueueItem item) [2025-10-20 12:51:34.876 -04:00] [ERR] Error while performing a library operation Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 6: 'database table is locked'. at Microsoft.Data.Sqlite.SqliteDataReader.NextResult() at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior) at Microsoft.Data.Sqlite.SqliteConnectionExtensions.ExecuteNonQuery(SqliteConnection connection, String commandText, SqliteParameter[] parameters) at Microsoft.Data.Sqlite.SqliteConnection.BeginTransaction(IsolationLevel isolationLevel, Boolean deferred) at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.BeginTransaction(IsolationLevel isolationLevel) at Jellyfin.Server.Implementations.Item.BaseItemRepository.UpdateOrInsertItems(IReadOnlyList`1 items, CancellationToken cancellationToken) at Emby.Server.Implementations.Library.LibraryManager.UpdateItemsAsync(IReadOnlyList`1 items, BaseItem parent, ItemUpdateType updateReason, CancellationToken cancellationToken) at MediaBrowser.Controller.Entities.BaseItem.UpdateToRepositoryAsync(ItemUpdateType updateReason, CancellationToken cancellationToken) at MediaBrowser.Providers.Manager.MetadataService`2.SaveItemAsync(MetadataResult`1 result, ItemUpdateType reason, CancellationToken cancellationToken) at MediaBrowser.Providers.Manager.MetadataService`2.<RefreshMetadata>g__SaveInternal|36_0(BaseItem item, MetadataRefreshOptions refreshOptions, ItemUpdateType updateType, Boolean isFirstRefresh, Boolean requiresRefresh, MetadataResult`1 metadataResult, CancellationToken cancellationToken) at MediaBrowser.Providers.Manager.MetadataService`2.RefreshMetadata(BaseItem item, MetadataRefreshOptions refreshOptions, CancellationToken cancellationToken) at MediaBrowser.Controller.Entities.BaseItem.RefreshMetadata(MetadataRefreshOptions options, CancellationToken cancellationToken) at MediaBrowser.Controller.Entities.Folder.RefreshChildMetadata(BaseItem child, MetadataRefreshOptions refreshOptions, Boolean recursive, IProgress`1 progress, CancellationToken cancellationToken) at MediaBrowser.Controller.LibraryTaskScheduler.LimitedConcurrencyLibraryScheduler.ProcessItem(TaskQueueItem item) [2025-10-20 13:02:12.784 -04:00] [ERR] Failed executing DbCommand ("32,998"ms) [Parameters=["@p10='?' (DbType = Int32), @p0='?' (Size = 32), @p1='?' (Size = 12), @p2='?' (Size = 7), @p3='?' (DbType = DateTime), @p4='?' (DbType = DateTime), @p5='?' (DbType = DateTime), @p6='?' (Size = 112), @p7='?' (Size = 7), @p8='?> ""UPDATE \"Devices\" SET \"AccessToken\" = @p0, \"AppName\" = @p1, \"AppVersion\" = @p2, \"DateCreated\" = @p3, \"DateLastActivity\" = @p4, \"DateModified\" = @p5, \"DeviceId\" = @p6, \"DeviceName\" = @p7, \"IsActive\" = @p8, \"UserId\" = @p9 WHERE \"Id\" = @p10; SELECT changes();" [2025-10-20 13:02:12.789 -04:00] [ERR] An exception occurred in the database while saving changes for context type '"Jellyfin.Database.Implementations.JellyfinDbContext"'." ""Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details. ---> Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'database is locked'. at Microsoft.Data.Sqlite.SqliteDataReader.NextResult() at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior) at Microsoft.Data.Sqlite.SqliteCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) --- End of inner exception stack trace --- at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalDatabase.SaveChangesAsync(IList`1 entries, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)" Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details. ---> Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'database is locked'. at Microsoft.Data.Sqlite.SqliteDataReader.NextResult() at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior) at Microsoft.Data.Sqlite.SqliteCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) --- End of inner exception stack trace --- at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalDatabase.SaveChangesAsync(IList`1 entries, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Jellyfin.Database.Implementations.JellyfinDbContext.<>c__DisplayClass62_0.<<SaveChangesAsync>b__0>d.MoveNext() --- End of stack trace from previous location --- at Jellyfin.Database.Implementations.Locking.NoLockBehavior.OnSaveChangesAsync(JellyfinDbContext context, Func`1 saveChanges) at Jellyfin.Database.Implementations.JellyfinDbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) [2025-10-20 13:02:12.790 -04:00] [ERR] Error trying to save changes. Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details. ---> Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'database is locked'. at Microsoft.Data.Sqlite.SqliteDataReader.NextResult() at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior) at Microsoft.Data.Sqlite.SqliteCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) --- End of inner exception stack trace --- at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalDatabase.SaveChangesAsync(IList`1 entries, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Jellyfin.Database.Implementations.JellyfinDbContext.<>c__DisplayClass62_0.<<SaveChangesAsync>b__0>d.MoveNext() --- End of stack trace from previous location --- at Jellyfin.Database.Implementations.Locking.NoLockBehavior.OnSaveChangesAsync(JellyfinDbContext context, Func`1 saveChanges) at Jellyfin.Database.Implementations.JellyfinDbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Jellyfin.Server.Implementations.Devices.DeviceManager.UpdateDevice(Device device) at Jellyfin.Server.Implementations.Devices.DeviceManager.UpdateDevice(Device device) at Jellyfin.Server.Implementations.Security.AuthorizationContext.GetAuthorizationInfoFromDictionary(Dictionary`2 auth, IHeaderDictionary headers, IQueryCollection queryString) at Jellyfin.Server.Implementations.Security.AuthorizationContext.GetAuthorizationInfoFromDictionary(Dictionary`2 auth, IHeaderDictionary headers, IQueryCollection queryString) at Jellyfin.Server.Implementations.Security.AuthorizationContext.GetAuthorizationInfo(HttpRequest requestContext) at Emby.Server.Implementations.HttpServer.Security.AuthService.Authenticate(HttpRequest request) at Jellyfin.Api.Auth.CustomAuthenticationHandler.HandleAuthenticateAsync() at Microsoft.AspNetCore.Authentication.AuthenticationHandler`1.AuthenticateAsync() at Microsoft.AspNetCore.Authentication.AuthenticationService.AuthenticateAsync(HttpContext context, String scheme) at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Jellyfin.Api.Middleware.RobotsRedirectionMiddleware.Invoke(HttpContext httpContext) at Jellyfin.Api.Middleware.LegacyEmbyRouteRewriteMiddleware.Invoke(HttpContext httpContext) at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context) at Jellyfin.Api.Middleware.ResponseTimeMiddleware.Invoke(HttpContext context, IServerConfigurationManager serverConfigurationManager) at Jellyfin.Api.Middleware.ExceptionMiddleware.Invoke(HttpContext context) [2025-10-20 13:02:12.897 -04:00] [ERR] Error processing request. URL "GET" "/ScheduledTasks". Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details. ---> Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'database is locked'. at Microsoft.Data.Sqlite.SqliteDataReader.NextResult() at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior) at Microsoft.Data.Sqlite.SqliteCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) --- End of inner exception stack trace --- at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalDatabase.SaveChangesAsync(IList`1 entries, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Jellyfin.Database.Implementations.JellyfinDbContext.<>c__DisplayClass62_0.<<SaveChangesAsync>b__0>d.MoveNext() --- End of stack trace from previous location --- at Jellyfin.Database.Implementations.Locking.NoLockBehavior.OnSaveChangesAsync(JellyfinDbContext context, Func`1 saveChanges) at Jellyfin.Database.Implementations.JellyfinDbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Jellyfin.Server.Implementations.Devices.DeviceManager.UpdateDevice(Device device) at Jellyfin.Server.Implementations.Devices.DeviceManager.UpdateDevice(Device device) at Jellyfin.Server.Implementations.Security.AuthorizationContext.GetAuthorizationInfoFromDictionary(Dictionary`2 auth, IHeaderDictionary headers, IQueryCollection queryString) at Jellyfin.Server.Implementations.Security.AuthorizationContext.GetAuthorizationInfoFromDictionary(Dictionary`2 auth, IHeaderDictionary headers, IQueryCollection queryString) at Jellyfin.Server.Implementations.Security.AuthorizationContext.GetAuthorizationInfo(HttpRequest requestContext) at Emby.Server.Implementations.HttpServer.Security.AuthService.Authenticate(HttpRequest request) at Jellyfin.Api.Auth.CustomAuthenticationHandler.HandleAuthenticateAsync() at Microsoft.AspNetCore.Authentication.AuthenticationHandler`1.AuthenticateAsync() at Microsoft.AspNetCore.Authentication.AuthenticationService.AuthenticateAsync(HttpContext context, String scheme) at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Jellyfin.Api.Middleware.RobotsRedirectionMiddleware.Invoke(HttpContext httpContext) at Jellyfin.Api.Middleware.LegacyEmbyRouteRewriteMiddleware.Invoke(HttpContext httpContext) at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context) at Jellyfin.Api.Middleware.ResponseTimeMiddleware.Invoke(HttpContext context, IServerConfigurationManager serverConfigurationManager) at Jellyfin.Api.Middleware.ExceptionMiddleware.Invoke(HttpContext context) [2025-10-20 13:04:16.513 -04:00] [ERR] Failed executing DbCommand ("30,504"ms) [Parameters=["@p10='?' (DbType = Int32), @p0='?' (Size = 32), @p1='?' (Size = 4), @p2='?' (Size = 9), @p3='?' (DbType = DateTime), @p4='?' (DbType = DateTime), @p5='?' (DbType = DateTime), @p6='?' (Size = 36), @p7='?' (Size = 6), @p8='?' > ""UPDATE \"Devices\" SET \"AccessToken\" = @p0, \"AppName\" = @p1, \"AppVersion\" = @p2, \"DateCreated\" = @p3, \"DateLastActivity\" = @p4, \"DateModified\" = @p5, \"DeviceId\" = @p6, \"DeviceName\" = @p7, \"IsActive\" = @p8, \"UserId\" = @p9 WHERE \"Id\" = @p10; SELECT changes();" [2025-10-20 13:04:16.514 -04:00] [ERR] An exception occurred in the database while saving changes for context type '"Jellyfin.Database.Implementations.JellyfinDbContext"'." ""Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details. ---> Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'database is locked'. at Microsoft.Data.Sqlite.SqliteDataReader.NextResult() at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior) at Microsoft.Data.Sqlite.SqliteCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) --- End of inner exception stack trace --- at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalDatabase.SaveChangesAsync(IList`1 entries, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken)" Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details. ---> Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'database is locked'. at Microsoft.Data.Sqlite.SqliteDataReader.NextResult() at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior) at Microsoft.Data.Sqlite.SqliteCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) --- End of inner exception stack trace --- at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalDatabase.SaveChangesAsync(IList`1 entries, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Jellyfin.Database.Implementations.JellyfinDbContext.<>c__DisplayClass62_0.<<SaveChangesAsync>b__0>d.MoveNext() --- End of stack trace from previous location --- at Jellyfin.Database.Implementations.Locking.NoLockBehavior.OnSaveChangesAsync(JellyfinDbContext context, Func`1 saveChanges) at Jellyfin.Database.Implementations.JellyfinDbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) [2025-10-20 13:04:16.515 -04:00] [ERR] Error trying to save changes. Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details. ---> Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'database is locked'. at Microsoft.Data.Sqlite.SqliteDataReader.NextResult() at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior) at Microsoft.Data.Sqlite.SqliteCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) --- End of inner exception stack trace --- at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalDatabase.SaveChangesAsync(IList`1 entries, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Jellyfin.Database.Implementations.JellyfinDbContext.<>c__DisplayClass62_0.<<SaveChangesAsync>b__0>d.MoveNext() --- End of stack trace from previous location --- at Jellyfin.Database.Implementations.Locking.NoLockBehavior.OnSaveChangesAsync(JellyfinDbContext context, Func`1 saveChanges) at Jellyfin.Database.Implementations.JellyfinDbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Jellyfin.Server.Implementations.Devices.DeviceManager.UpdateDevice(Device device) at Jellyfin.Server.Implementations.Devices.DeviceManager.UpdateDevice(Device device) at Jellyfin.Server.Implementations.Security.AuthorizationContext.GetAuthorizationInfoFromDictionary(Dictionary`2 auth, IHeaderDictionary headers, IQueryCollection queryString) at Jellyfin.Server.Implementations.Security.AuthorizationContext.GetAuthorizationInfoFromDictionary(Dictionary`2 auth, IHeaderDictionary headers, IQueryCollection queryString) at Jellyfin.Server.Implementations.Security.AuthorizationContext.GetAuthorizationInfo(HttpRequest requestContext) at Emby.Server.Implementations.HttpServer.Security.AuthService.Authenticate(HttpRequest request) at Jellyfin.Api.Auth.CustomAuthenticationHandler.HandleAuthenticateAsync() at Microsoft.AspNetCore.Authentication.AuthenticationHandler`1.AuthenticateAsync() at Microsoft.AspNetCore.Authentication.AuthenticationService.AuthenticateAsync(HttpContext context, String scheme) at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Jellyfin.Api.Middleware.RobotsRedirectionMiddleware.Invoke(HttpContext httpContext) at Jellyfin.Api.Middleware.LegacyEmbyRouteRewriteMiddleware.Invoke(HttpContext httpContext) at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context) at Jellyfin.Api.Middleware.ResponseTimeMiddleware.Invoke(HttpContext context, IServerConfigurationManager serverConfigurationManager) at Jellyfin.Api.Middleware.ExceptionMiddleware.Invoke(HttpContext context) [2025-10-20 13:04:16.516 -04:00] [ERR] Error processing request. URL "GET" "/Users/<uuid>/Items". Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details. ---> Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'database is locked'. at Microsoft.Data.Sqlite.SqliteDataReader.NextResult() at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior) at Microsoft.Data.Sqlite.SqliteCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) --- End of inner exception stack trace --- at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(IEnumerable`1 commandBatches, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalDatabase.SaveChangesAsync(IList`1 entries, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IList`1 entriesToSave, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(StateManager stateManager, Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Jellyfin.Database.Implementations.JellyfinDbContext.<>c__DisplayClass62_0.<<SaveChangesAsync>b__0>d.MoveNext() --- End of stack trace from previous location --- at Jellyfin.Database.Implementations.Locking.NoLockBehavior.OnSaveChangesAsync(JellyfinDbContext context, Func`1 saveChanges) at Jellyfin.Database.Implementations.JellyfinDbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Jellyfin.Server.Implementations.Devices.DeviceManager.UpdateDevice(Device device) at Jellyfin.Server.Implementations.Devices.DeviceManager.UpdateDevice(Device device) at Jellyfin.Server.Implementations.Security.AuthorizationContext.GetAuthorizationInfoFromDictionary(Dictionary`2 auth, IHeaderDictionary headers, IQueryCollection queryString) at Jellyfin.Server.Implementations.Security.AuthorizationContext.GetAuthorizationInfoFromDictionary(Dictionary`2 auth, IHeaderDictionary headers, IQueryCollection queryString) at Jellyfin.Server.Implementations.Security.AuthorizationContext.GetAuthorizationInfo(HttpRequest requestContext) at Emby.Server.Implementations.HttpServer.Security.AuthService.Authenticate(HttpRequest request) at Jellyfin.Api.Auth.CustomAuthenticationHandler.HandleAuthenticateAsync() at Microsoft.AspNetCore.Authentication.AuthenticationHandler`1.AuthenticateAsync() at Microsoft.AspNetCore.Authentication.AuthenticationService.AuthenticateAsync(HttpContext context, String scheme) at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Jellyfin.Api.Middleware.RobotsRedirectionMiddleware.Invoke(HttpContext httpContext) at Jellyfin.Api.Middleware.LegacyEmbyRouteRewriteMiddleware.Invoke(HttpContext httpContext) at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context) at Jellyfin.Api.Middleware.ResponseTimeMiddleware.Invoke(HttpContext context, IServerConfigurationManager serverConfigurationManager) at Jellyfin.Api.Middleware.ExceptionMiddleware.Invoke(HttpContext context) [2025-10-20 13:05:29.821 -04:00] [ERR] Failed executing DbCommand ("38,951"ms) [Parameters=["@p10='?' (DbType = Int32), @p0='?' (Size = 32), @p1='?' (Size = 12), @p2='?' (Size = 7), @p3='?' (DbType = DateTime), @p4='?' (DbType = DateTime), @p5='?' (DbType = DateTime), @p6='?' (Size = 112), @p7='?' (Size = 7), @p8='?> ""UPDATE \"Devices\" SET \"AccessToken\" = @p0, \"AppName\" = @p1, \"AppVersion\" = @p2, \"DateCreated\" = @p3, \"DateLastActivity\" = @p4, \"DateModified\" = @p5, \"DeviceId\" = @p6, \"DeviceName\" = @p7, \"IsActive\" = @p8, \"UserId\" = @p9 WHERE \"Id\" = @p10; SELECT changes();" ``` ### FFmpeg logs ```shell ``` ### Client / Browser logs _No response_ ### Relevant screenshots or videos _No response_ ### Additional information _No response_
OVERLORD added the bug label 2026-02-07 04:59:25 +03:00
Author
Owner

@crobibero commented on GitHub (Oct 20, 2025):

"NoLock" doesn't add any locking, please read the blog post on locking methods
https://jellyfin.org/posts/SQLite-locking

@crobibero commented on GitHub (Oct 20, 2025): "NoLock" doesn't add any locking, please read the blog post on locking methods https://jellyfin.org/posts/SQLite-locking
Author
Owner

@papavictor commented on GitHub (Oct 20, 2025):

Is it possible for the user to configure a different mode of locking, say Optimistic?

@papavictor commented on GitHub (Oct 20, 2025): Is it possible for the user to configure a different mode of locking, say Optimistic?
Author
Owner
@JPVenson commented on GitHub (Oct 20, 2025): https://jellyfin.org/docs/general/administration/troubleshooting#database-locked-errors
Author
Owner

@Kitt3120 commented on GitHub (Oct 21, 2025):

Setting the lock behaviour to Optimistic helped me get my server running again. Performance is super slow though. It takes about 7 minutes to load up the web interface main page. Another 3 minutes to get into the admin dashboard. CPU usage is at 6%, so it eats up about one of my cores. Still got 2 "database is locked" errors. Something is definitely going wrong here. But it did load eventually, so I was able to set my parallel scan task limit to 1, set the behaviour back to NoLock, and restart the container again. However, that did not change anything, performance is still bad, and still getting lock errors.

I am not on a network file system, this is local.

@Kitt3120 commented on GitHub (Oct 21, 2025): Setting the lock behaviour to Optimistic helped me get my server running again. Performance is super slow though. It takes about 7 minutes to load up the web interface main page. Another 3 minutes to get into the admin dashboard. CPU usage is at 6%, so it eats up about one of my cores. Still got 2 "database is locked" errors. Something is definitely going wrong here. But it did load eventually, so I was able to set my parallel scan task limit to 1, set the behaviour back to NoLock, and restart the container again. However, that did not change anything, performance is still bad, and still getting lock errors. I am not on a network file system, this is local.
Author
Owner

@JPVenson commented on GitHub (Oct 21, 2025):

zfs?

@JPVenson commented on GitHub (Oct 21, 2025): zfs?
Author
Owner

@Kitt3120 commented on GitHub (Oct 21, 2025):

Yes, I am on ZFS. I set the behaviour back to Optimistic, and kept the low parallel scan task limit of 1. It's super slow, but at least I can access the web interface. I never had this problem before updating to 10.11.0. The "database is locked" errors occur while the OptimizeDatabaseTask is running.

jellyfin-1  | [00:46:18] [ERR] [30] Emby.Server.Implementations.ScheduledTasks.Tasks.OptimizeDatabaseTask: Error while optimizing jellyfin.db
jellyfin-1  | Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 6: 'database table is locked'.
jellyfin-1  |    at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db)
jellyfin-1  |    at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()
jellyfin-1  |    at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)
jellyfin-1  |    at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader()
jellyfin-1  |    at Microsoft.Data.Sqlite.SqliteCommand.ExecuteNonQuery()
jellyfin-1  |    at System.Data.Common.DbCommand.ExecuteNonQueryAsync(CancellationToken cancellationToken)
jellyfin-1  | --- End of stack trace from previous location ---
jellyfin-1  |    at Jellyfin.Database.Implementations.Locking.OptimisticLockBehavior.RetryInterceptor.<>c__DisplayClass4_0.<<NonQueryExecutingAsync>b__0>d.MoveNext()
jellyfin-1  | --- End of stack trace from previous location ---
jellyfin-1  |    at Polly.Retry.AsyncRetryEngine.ImplementationAsync[TResult](Func`3 action, Context context, ExceptionPredicates shouldRetryExceptionPredicates, ResultPredicates`1 shouldRetryResultPredicates, Func`5 onRetryAsync, CancellationToken cancellationToken, Int32 permittedRetryCount, IEnumerable`1 sleepDurationsEnumerable, Func`4 sleepDurationProvider, Boolean continueOnCapturedContext)
jellyfin-1  |    at Polly.AsyncPolicy.ExecuteInternalAsync[TResult](Func`3 action, Context context, Boolean continueOnCapturedContext, CancellationToken cancellationToken)
jellyfin-1  |    at Jellyfin.Database.Implementations.Locking.OptimisticLockBehavior.RetryInterceptor.NonQueryExecutingAsync(DbCommand command, CommandEventData eventData, InterceptionResult`1 result, CancellationToken cancellationToken)
jellyfin-1  |    at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQueryAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
jellyfin-1  |    at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQueryAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
jellyfin-1  |    at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQueryAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
jellyfin-1  |    at Microsoft.EntityFrameworkCore.RelationalDatabaseFacadeExtensions.ExecuteSqlRawAsync(DatabaseFacade databaseFacade, String sql, IEnumerable`1 parameters, CancellationToken cancellationToken)
jellyfin-1  |    at Jellyfin.Database.Providers.Sqlite.SqliteDatabaseProvider.RunScheduledOptimisation(CancellationToken cancellationToken)
jellyfin-1  |    at Jellyfin.Database.Providers.Sqlite.SqliteDatabaseProvider.RunScheduledOptimisation(CancellationToken cancellationToken)
jellyfin-1  |    at Emby.Server.Implementations.ScheduledTasks.Tasks.OptimizeDatabaseTask.ExecuteAsync(IProgress`1 progress, CancellationToken cancellationToken)
jellyfin-1  | [00:46:18] [INF] [30] Emby.Server.Implementations.ScheduledTasks.TaskManager: Optimize database Completed after 2 minute(s) and 3 seconds

I'll let all the tasks finish overnight for now. Maybe the performance hit comes from the locking mechanism + all tasks running because of the container restart.

Edit: It's not just the OptimizeDatabaseTask.

jellyfin-1  | [01:00:30] [ERR] [78] Microsoft.EntityFrameworkCore.Database.Command: Failed executing DbCommand (451,562ms) [Parameters=[@__8__locals1_video_Id_0='?' (DbType = Guid)], CommandType='Text', CommandTimeout='30']
jellyfin-1  | DELETE FROM "TrickplayInfos" AS "t"
jellyfin-1  | WHERE "t"."ItemId" = @__8__locals1_video_Id_0
jellyfin-1  | [01:00:31] [ERR] [78] MediaBrowser.Providers.Trickplay.TrickplayImagesTask: Error creating trickplay files for If I Had One More Chance
jellyfin-1  | Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 6: 'database table is locked'.
jellyfin-1  |    at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()
jellyfin-1  |    at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)
jellyfin-1  |    at System.Data.Common.DbCommand.ExecuteNonQueryAsync(CancellationToken cancellationToken)
jellyfin-1  | --- End of stack trace from previous location ---
jellyfin-1  |    at Jellyfin.Database.Implementations.Locking.OptimisticLockBehavior.RetryInterceptor.<>c__DisplayClass4_0.<<NonQueryExecutingAsync>b__0>d.MoveNext()
jellyfin-1  | --- End of stack trace from previous location ---
jellyfin-1  |    at Polly.Retry.AsyncRetryEngine.ImplementationAsync[TResult](Func`3 action, Context context, ExceptionPredicates shouldRetryExceptionPredicates, ResultPredicates`1 shouldRetryResultPredicates, Func`5 onRetryAsync, CancellationToken cancellationToken, Int32 permittedRetryCount, IEnumerable`1 sleepDurationsEnumerable, Func`4 sleepDurationProvider, Boolean continueOnCapturedContext)
jellyfin-1  |    at Polly.AsyncPolicy.ExecuteInternalAsync[TResult](Func`3 action, Context context, Boolean continueOnCapturedContext, CancellationToken cancellationToken)
jellyfin-1  |    at Jellyfin.Database.Implementations.Locking.OptimisticLockBehavior.RetryInterceptor.NonQueryExecutingAsync(DbCommand command, CommandEventData eventData, InterceptionResult`1 result, CancellationToken cancellationToken)
jellyfin-1  |    at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQueryAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
jellyfin-1  |    at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQueryAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
jellyfin-1  |    at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQueryAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
jellyfin-1  |    at Jellyfin.Server.Implementations.Trickplay.TrickplayManager.RefreshTrickplayDataAsync(Video video, Boolean replace, LibraryOptions libraryOptions, CancellationToken cancellationToken)
jellyfin-1  |    at Jellyfin.Server.Implementations.Trickplay.TrickplayManager.RefreshTrickplayDataAsync(Video video, Boolean replace, LibraryOptions libraryOptions, CancellationToken cancellationToken)
jellyfin-1  |    at MediaBrowser.Providers.Trickplay.TrickplayImagesTask.ExecuteAsync(IProgress`1 progress, CancellationToken cancellationToken)
@Kitt3120 commented on GitHub (Oct 21, 2025): Yes, I am on ZFS. I set the behaviour back to Optimistic, and kept the low parallel scan task limit of 1. It's super slow, but at least I can access the web interface. I never had this problem before updating to 10.11.0. The "database is locked" errors occur while the OptimizeDatabaseTask is running. ``` jellyfin-1 | [00:46:18] [ERR] [30] Emby.Server.Implementations.ScheduledTasks.Tasks.OptimizeDatabaseTask: Error while optimizing jellyfin.db jellyfin-1 | Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 6: 'database table is locked'. jellyfin-1 | at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db) jellyfin-1 | at Microsoft.Data.Sqlite.SqliteDataReader.NextResult() jellyfin-1 | at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior) jellyfin-1 | at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader() jellyfin-1 | at Microsoft.Data.Sqlite.SqliteCommand.ExecuteNonQuery() jellyfin-1 | at System.Data.Common.DbCommand.ExecuteNonQueryAsync(CancellationToken cancellationToken) jellyfin-1 | --- End of stack trace from previous location --- jellyfin-1 | at Jellyfin.Database.Implementations.Locking.OptimisticLockBehavior.RetryInterceptor.<>c__DisplayClass4_0.<<NonQueryExecutingAsync>b__0>d.MoveNext() jellyfin-1 | --- End of stack trace from previous location --- jellyfin-1 | at Polly.Retry.AsyncRetryEngine.ImplementationAsync[TResult](Func`3 action, Context context, ExceptionPredicates shouldRetryExceptionPredicates, ResultPredicates`1 shouldRetryResultPredicates, Func`5 onRetryAsync, CancellationToken cancellationToken, Int32 permittedRetryCount, IEnumerable`1 sleepDurationsEnumerable, Func`4 sleepDurationProvider, Boolean continueOnCapturedContext) jellyfin-1 | at Polly.AsyncPolicy.ExecuteInternalAsync[TResult](Func`3 action, Context context, Boolean continueOnCapturedContext, CancellationToken cancellationToken) jellyfin-1 | at Jellyfin.Database.Implementations.Locking.OptimisticLockBehavior.RetryInterceptor.NonQueryExecutingAsync(DbCommand command, CommandEventData eventData, InterceptionResult`1 result, CancellationToken cancellationToken) jellyfin-1 | at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQueryAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) jellyfin-1 | at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQueryAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) jellyfin-1 | at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQueryAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) jellyfin-1 | at Microsoft.EntityFrameworkCore.RelationalDatabaseFacadeExtensions.ExecuteSqlRawAsync(DatabaseFacade databaseFacade, String sql, IEnumerable`1 parameters, CancellationToken cancellationToken) jellyfin-1 | at Jellyfin.Database.Providers.Sqlite.SqliteDatabaseProvider.RunScheduledOptimisation(CancellationToken cancellationToken) jellyfin-1 | at Jellyfin.Database.Providers.Sqlite.SqliteDatabaseProvider.RunScheduledOptimisation(CancellationToken cancellationToken) jellyfin-1 | at Emby.Server.Implementations.ScheduledTasks.Tasks.OptimizeDatabaseTask.ExecuteAsync(IProgress`1 progress, CancellationToken cancellationToken) jellyfin-1 | [00:46:18] [INF] [30] Emby.Server.Implementations.ScheduledTasks.TaskManager: Optimize database Completed after 2 minute(s) and 3 seconds ``` I'll let all the tasks finish overnight for now. Maybe the performance hit comes from the locking mechanism + all tasks running because of the container restart. Edit: It's not just the OptimizeDatabaseTask. ``` jellyfin-1 | [01:00:30] [ERR] [78] Microsoft.EntityFrameworkCore.Database.Command: Failed executing DbCommand (451,562ms) [Parameters=[@__8__locals1_video_Id_0='?' (DbType = Guid)], CommandType='Text', CommandTimeout='30'] jellyfin-1 | DELETE FROM "TrickplayInfos" AS "t" jellyfin-1 | WHERE "t"."ItemId" = @__8__locals1_video_Id_0 jellyfin-1 | [01:00:31] [ERR] [78] MediaBrowser.Providers.Trickplay.TrickplayImagesTask: Error creating trickplay files for If I Had One More Chance jellyfin-1 | Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 6: 'database table is locked'. jellyfin-1 | at Microsoft.Data.Sqlite.SqliteDataReader.NextResult() jellyfin-1 | at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior) jellyfin-1 | at System.Data.Common.DbCommand.ExecuteNonQueryAsync(CancellationToken cancellationToken) jellyfin-1 | --- End of stack trace from previous location --- jellyfin-1 | at Jellyfin.Database.Implementations.Locking.OptimisticLockBehavior.RetryInterceptor.<>c__DisplayClass4_0.<<NonQueryExecutingAsync>b__0>d.MoveNext() jellyfin-1 | --- End of stack trace from previous location --- jellyfin-1 | at Polly.Retry.AsyncRetryEngine.ImplementationAsync[TResult](Func`3 action, Context context, ExceptionPredicates shouldRetryExceptionPredicates, ResultPredicates`1 shouldRetryResultPredicates, Func`5 onRetryAsync, CancellationToken cancellationToken, Int32 permittedRetryCount, IEnumerable`1 sleepDurationsEnumerable, Func`4 sleepDurationProvider, Boolean continueOnCapturedContext) jellyfin-1 | at Polly.AsyncPolicy.ExecuteInternalAsync[TResult](Func`3 action, Context context, Boolean continueOnCapturedContext, CancellationToken cancellationToken) jellyfin-1 | at Jellyfin.Database.Implementations.Locking.OptimisticLockBehavior.RetryInterceptor.NonQueryExecutingAsync(DbCommand command, CommandEventData eventData, InterceptionResult`1 result, CancellationToken cancellationToken) jellyfin-1 | at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQueryAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) jellyfin-1 | at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQueryAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) jellyfin-1 | at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQueryAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) jellyfin-1 | at Jellyfin.Server.Implementations.Trickplay.TrickplayManager.RefreshTrickplayDataAsync(Video video, Boolean replace, LibraryOptions libraryOptions, CancellationToken cancellationToken) jellyfin-1 | at Jellyfin.Server.Implementations.Trickplay.TrickplayManager.RefreshTrickplayDataAsync(Video video, Boolean replace, LibraryOptions libraryOptions, CancellationToken cancellationToken) jellyfin-1 | at MediaBrowser.Providers.Trickplay.TrickplayImagesTask.ExecuteAsync(IProgress`1 progress, CancellationToken cancellationToken) ```
Author
Owner

@papavictor commented on GitHub (Oct 21, 2025):

My last attempt of running Optimistic with 4 threads (12 cores) got the same issue and now won't boot, despite restarting jellyfin several times. I'll have to restore from backup a 4th time and attempt another upgrade. I've never had database slowness prior to this version. I've now had several queries timeout over 10 minutes. If lowering the scan count to 1 doesn't help, I'll have to downgrade until these queries are optimized.

root@jellyfin:~# egrep "[0-9][0-9][0-9],[0-9]+\"ms" /var/log/jellyfin/jellyfin20251020.log 
[2025-10-20 19:15:01.397 -04:00] [ERR] Failed executing DbCommand ("148,770"ms) [Parameters=["@__item_Id_0='?' (DbType = Guid)"], CommandType='Text', CommandTimeout='30']"
[2025-10-20 19:17:31.749 -04:00] [ERR] Failed executing DbCommand ("389,319"ms) [Parameters=["@p10='?' (DbType = Int32), @p0='?' (Size = 32), @p1='?' (Size = 4), @p2='?' (Size = 9), @p3='?' (DbType = DateTime), @p4='?' (DbType = DateTime), @p5='?' (DbType = DateTime), @p6='?' (Size = 36), @p7='?' (Size = 6), @p8='?' (DbType = Boolean), @p9='?' (DbType = Guid)"], CommandType='Text', CommandTimeout='30']"
[2025-10-20 19:22:47.825 -04:00] [ERR] Failed executing DbCommand ("615,469"ms) [Parameters=["@__filter_IsFolder_0='?' (DbType = Boolean), @__isVirtualItem_Value_1='?' (DbType = Boolean), @__filter_AncestorIds_2='?' (Size = 40)"], CommandType='Text', CommandTimeout='30']"
[2025-10-20 19:22:47.825 -04:00] [ERR] Failed executing DbCommand ("623,673"ms) [Parameters=["@__entity_Id_0='?' (DbType = Guid)"], CommandType='Text', CommandTimeout='30']"
[2025-10-20 19:22:47.825 -04:00] [ERR] Failed executing DbCommand ("615,466"ms) [Parameters=["@__filter_IsFolder_0='?' (DbType = Boolean), @__isVirtualItem_Value_1='?' (DbType = Boolean), @__filter_AncestorIds_2='?' (Size = 40), @__p_3='?' (DbType = Int32)"], CommandType='Text', CommandTimeout='30']"
[2025-10-20 19:22:47.826 -04:00] [ERR] Failed executing DbCommand ("615,280"ms) [Parameters=["@__p_0='?' (Size = 586)"], CommandType='Text', CommandTimeout='30']"
[2025-10-20 19:22:47.826 -04:00] [ERR] Failed executing DbCommand ("673,025"ms) [Parameters=["@__p_0='?' (Size = 586)"], CommandType='Text', CommandTimeout='30']"
[2025-10-20 19:22:47.826 -04:00] [ERR] Failed executing DbCommand ("615,475"ms) [Parameters=["@__p_0='?' (Size = 586)"], CommandType='Text', CommandTimeout='30']"
[2025-10-20 19:22:47.826 -04:00] [ERR] Failed executing DbCommand ("615,284"ms) [Parameters=["@__filter_SeriesPresentationUniqueKey_0='?' (Size = 32)"], CommandType='Text', CommandTimeout='30']"
[2025-10-20 19:22:47.826 -04:00] [ERR] Failed executing DbCommand ("615,281"ms) [Parameters=["@__p_0='?' (Size = 586)"], CommandType='Text', CommandTimeout='30']"
[2025-10-20 19:22:47.826 -04:00] [ERR] Failed executing DbCommand ("615,277"ms) [Parameters=["@p10='?' (DbType = Int32), @p0='?' (Size = 32), @p1='?' (Size = 4), @p2='?' (Size = 9), @p3='?' (DbType = DateTime), @p4='?' (DbType = DateTime), @p5='?' (DbType = DateTime), @p6='?' (Size = 36), @p7='?' (Size = 6), @p8='?' (DbType = Boolean), @p9='?' (DbType = Guid)"], CommandType='Text', CommandTimeout='30']"
[2025-10-20 19:22:47.826 -04:00] [ERR] Failed executing DbCommand ("615,285"ms) [Parameters=["@__isVirtualItem_Value_0='?' (DbType = Boolean), @__filter_SeriesPresentationUniqueKey_1='?' (Size = 32)"], CommandType='Text', CommandTimeout='30']"
[2025-10-20 19:22:47.826 -04:00] [ERR] Failed executing DbCommand ("615,470"ms) [Parameters=["@__p_0='?' (Size = 586)"], CommandType='Text', CommandTimeout='30']"
[2025-10-20 19:22:47.827 -04:00] [ERR] Failed executing DbCommand ("615,279"ms) [Parameters=["@__id_0='?' (DbType = Guid)"], CommandType='Text', CommandTimeout='30']"
[2025-10-20 19:22:47.827 -04:00] [ERR] Failed executing DbCommand ("615,281"ms) [Parameters=["@__filter_ParentId_0='?' (DbType = Guid)"], CommandType='Text', CommandTimeout='30']"
[2025-10-20 19:22:47.827 -04:00] [ERR] Failed executing DbCommand ("615,277"ms) [Parameters=["@__filter_ItemId_1='?' (DbType = Guid), @__filter_ItemId_0='?' (DbType = Guid)"], CommandType='Text', CommandTimeout='30']"
[2025-10-20 19:22:47.827 -04:00] [ERR] Failed executing DbCommand ("615,278"ms) [Parameters=["@__filter_ItemId_1='?' (DbType = Guid), @__filter_ItemId_0='?' (DbType = Guid)"], CommandType='Text', CommandTimeout='30']"
[2025-10-20 19:22:47.827 -04:00] [ERR] Failed executing DbCommand ("615,284"ms) [Parameters=["@__filter_IsFolder_0='?' (DbType = Boolean), @__isVirtualItem_Value_1='?' (DbType = Boolean), @__filter_AncestorIds_2='?' (Size = 40), @__p_3='?' (DbType = Int32)"], CommandType='Text', CommandTimeout='30']"
[2025-10-20 19:22:47.827 -04:00] [ERR] Failed executing DbCommand ("615,277"ms) [Parameters=["@__p_0='?' (Size = 586)"], CommandType='Text', CommandTimeout='30']"
[2025-10-20 19:22:47.827 -04:00] [ERR] Failed executing DbCommand ("615,279"ms) [Parameters=["@__filter_IsFolder_0='?' (DbType = Boolean), @__isVirtualItem_Value_1='?' (DbType = Boolean), @__filter_AncestorIds_2='?' (Size = 40)"], CommandType='Text', CommandTimeout='30']"
[2025-10-20 19:22:47.827 -04:00] [ERR] Failed executing DbCommand ("615,279"ms) [Parameters=["@__filter_ParentId_0='?' (DbType = Guid)"], CommandType='Text', CommandTimeout='30']"
[2025-10-20 19:22:47.829 -04:00] [ERR] Failed executing DbCommand ("615,280"ms) [Parameters=["@__item_Id_0='?' (DbType = Guid)"], CommandType='Text', CommandTimeout='30']"
[2025-10-20 19:22:47.829 -04:00] [ERR] Failed executing DbCommand ("615,272"ms) [Parameters=["@__id_0='?' (DbType = Guid)"], CommandType='Text', CommandTimeout='30']"
[2025-10-20 19:22:47.830 -04:00] [ERR] Failed executing DbCommand ("615,266"ms) [Parameters=["@__filter_IsFolder_0='?' (DbType = Boolean), @__isVirtualItem_Value_1='?' (DbType = Boolean), @__filter_AncestorIds_2='?' (Size = 40), @__p_3='?' (DbType = Int32)"], CommandType='Text', CommandTimeout='30']"
[2025-10-20 19:22:47.830 -04:00] [ERR] Failed executing DbCommand ("615,265"ms) [Parameters=["@__id_0='?' (DbType = Guid)"], CommandType='Text', CommandTimeout='30']"
[2025-10-20 19:22:47.832 -04:00] [ERR] Failed executing DbCommand ("615,266"ms) [Parameters=["@__item_Id_0='?' (DbType = Guid)"], CommandType='Text', CommandTimeout='30']"
[2025-10-20 19:22:56.410 -04:00] [ERR] Failed executing DbCommand ("623,805"ms) [Parameters=["@__isVirtualItem_Value_0='?' (DbType = Boolean), @__filter_SeriesPresentationUniqueKey_1='?' (Size = 32)"], CommandType='Text', CommandTimeout='30']"
[2025-10-20 19:22:56.410 -04:00] [ERR] Failed executing DbCommand ("623,834"ms) [Parameters=["@__filter_AncestorIds_0='?' (Size = 40)"], CommandType='Text', CommandTimeout='30']"
[2025-10-20 19:22:58.863 -04:00] [ERR] Failed executing DbCommand ("626,386"ms) [Parameters=["@__filter_ParentId_0='?' (DbType = Guid)"], CommandType='Text', CommandTimeout='30']"
[2025-10-20 19:22:58.863 -04:00] [ERR] Failed executing DbCommand ("626,392"ms) [Parameters=["@__p_0='?' (Size = 586)"], CommandType='Text', CommandTimeout='30']"
[2025-10-20 19:23:09.748 -04:00] [ERR] Failed executing DbCommand ("637,193"ms) [Parameters=["@__filter_IsFolder_0='?' (DbType = Boolean), @__isVirtualItem_Value_1='?' (DbType = Boolean), @__filter_AncestorIds_2='?' (Size = 40)"], CommandType='Text', CommandTimeout='30']"
[2025-10-20 19:23:09.748 -04:00] [ERR] Failed executing DbCommand ("637,199"ms) [Parameters=["@__filter_ParentId_0='?' (DbType = Guid)"], CommandType='Text', CommandTimeout='30']"
[2025-10-20 19:23:12.024 -04:00] [ERR] Failed executing DbCommand ("624,830"ms) [Parameters=["@__filter_AncestorIds_0='?' (Size = 40)"], CommandType='Text', CommandTimeout='30']"
[2025-10-20 19:23:13.058 -04:00] [ERR] Failed executing DbCommand ("640,504"ms) [Parameters=["@__isVirtualItem_Value_0='?' (DbType = Boolean), @__filter_SeriesPresentationUniqueKey_1='?' (Size = 32)"], CommandType='Text', CommandTimeout='30']"

615secs:

[2025-10-20 19:22:47.825 -04:00] [ERR] Failed executing DbCommand ("615,466"ms) [Parameters=["@__filter_IsFolder_0='?' (DbType = Boolean), @__isVirtualItem_Value_1='?' (DbType = Boolean), @__filter_AncestorIds_2='?' (Size = 40), @__p_3='?' (DbType = Int32)"], CommandType='Text', CommandTimeout='30']"
""SELECT \"b5\".\"Id\", \"b5\".\"Album\", \"b5\".\"AlbumArtists\", \"b5\".\"Artists\", \"b5\".\"Audio\", \"b5\".\"ChannelId\", \"b5\".\"CleanName\", \"b5\".\"CommunityRating\", \"b5\".\"CriticRating\", \"b5\".\"CustomRating\", \"b5\".\"Data\", \"b5\".\"DateCreated\", \"b5\".\"DateLastMediaAdded\", \"b5\".\"DateLastRe
freshed\", \"b5\".\"DateLastSaved\", \"b5\".\"DateModified\", \"b5\".\"EndDate\", \"b5\".\"EpisodeTitle\", \"b5\".\"ExternalId\", \"b5\".\"ExternalSeriesId\", \"b5\".\"ExternalServiceId\", \"b5\".\"ExtraIds\", \"b5\".\"ExtraType\", \"b5\".\"ForcedSortName\", \"b5\".\"Genres\", \"b5\".\"Height\", \"b5\".\"IndexNumber\
", \"b5\".\"InheritedParentalRatingSubValue\", \"b5\".\"InheritedParentalRatingValue\", \"b5\".\"IsFolder\", \"b5\".\"IsInMixedFolder\", \"b5\".\"IsLocked\", \"b5\".\"IsMovie\", \"b5\".\"IsRepeat\", \"b5\".\"IsSeries\", \"b5\".\"IsVirtualItem\", \"b5\".\"LUFS\", \"b5\".\"MediaType\", \"b5\".\"Name\", \"b5\".\"Normali
zationGain\", \"b5\".\"OfficialRating\", \"b5\".\"OriginalTitle\", \"b5\".\"Overview\", \"b5\".\"OwnerId\", \"b5\".\"ParentId\", \"b5\".\"ParentIndexNumber\", \"b5\".\"Path\", \"b5\".\"PreferredMetadataCountryCode\", \"b5\".\"PreferredMetadataLanguage\", \"b5\".\"PremiereDate\", \"b5\".\"PresentationUniqueKey\", \"b5
\".\"PrimaryVersionId\", \"b5\".\"ProductionLocations\", \"b5\".\"ProductionYear\", \"b5\".\"RunTimeTicks\", \"b5\".\"SeasonId\", \"b5\".\"SeasonName\", \"b5\".\"SeriesId\", \"b5\".\"SeriesName\", \"b5\".\"SeriesPresentationUniqueKey\", \"b5\".\"ShowId\", \"b5\".\"Size\", \"b5\".\"SortName\", \"b5\".\"StartDate\", \"
b5\".\"Studios\", \"b5\".\"Tagline\", \"b5\".\"Tags\", \"b5\".\"TopParentId\", \"b5\".\"TotalBitrate\", \"b5\".\"Type\", \"b5\".\"UnratedType\", \"b5\".\"Width\", \"b2\".\"Id\", \"b2\".\"ItemId\", \"b3\".\"ItemId\", \"b3\".\"ProviderId\", \"b3\".\"ProviderValue\", \"b4\".\"Id\", \"b4\".\"ItemId\", \"u\".\"ItemId\", \
"u\".\"UserId\", \"u\".\"CustomDataKey\", \"u\".\"AudioStreamIndex\", \"u\".\"IsFavorite\", \"u\".\"LastPlayedDate\", \"u\".\"Likes\", \"u\".\"PlayCount\", \"u\".\"PlaybackPositionTicks\", \"u\".\"Played\", \"u\".\"Rating\", \"u\".\"RetentionDate\", \"u\".\"SubtitleStreamIndex\"
FROM (
    SELECT \"b\".\"Id\", \"b\".\"Album\", \"b\".\"AlbumArtists\", \"b\".\"Artists\", \"b\".\"Audio\", \"b\".\"ChannelId\", \"b\".\"CleanName\", \"b\".\"CommunityRating\", \"b\".\"CriticRating\", \"b\".\"CustomRating\", \"b\".\"Data\", \"b\".\"DateCreated\", \"b\".\"DateLastMediaAdded\", \"b\".\"DateLastRefreshed\", \
"b\".\"DateLastSaved\", \"b\".\"DateModified\", \"b\".\"EndDate\", \"b\".\"EpisodeTitle\", \"b\".\"ExternalId\", \"b\".\"ExternalSeriesId\", \"b\".\"ExternalServiceId\", \"b\".\"ExtraIds\", \"b\".\"ExtraType\", \"b\".\"ForcedSortName\", \"b\".\"Genres\", \"b\".\"Height\", \"b\".\"IndexNumber\", \"b\".\"InheritedParen
talRatingSubValue\", \"b\".\"InheritedParentalRatingValue\", \"b\".\"IsFolder\", \"b\".\"IsInMixedFolder\", \"b\".\"IsLocked\", \"b\".\"IsMovie\", \"b\".\"IsRepeat\", \"b\".\"IsSeries\", \"b\".\"IsVirtualItem\", \"b\".\"LUFS\", \"b\".\"MediaType\", \"b\".\"Name\", \"b\".\"NormalizationGain\", \"b\".\"OfficialRating\"
, \"b\".\"OriginalTitle\", \"b\".\"Overview\", \"b\".\"OwnerId\", \"b\".\"ParentId\", \"b\".\"ParentIndexNumber\", \"b\".\"Path\", \"b\".\"PreferredMetadataCountryCode\", \"b\".\"PreferredMetadataLanguage\", \"b\".\"PremiereDate\", \"b\".\"PresentationUniqueKey\", \"b\".\"PrimaryVersionId\", \"b\".\"ProductionLocatio
ns\", \"b\".\"ProductionYear\", \"b\".\"RunTimeTicks\", \"b\".\"SeasonId\", \"b\".\"SeasonName\", \"b\".\"SeriesId\", \"b\".\"SeriesName\", \"b\".\"SeriesPresentationUniqueKey\", \"b\".\"ShowId\", \"b\".\"Size\", \"b\".\"SortName\", \"b\".\"StartDate\", \"b\".\"Studios\", \"b\".\"Tagline\", \"b\".\"Tags\", \"b\".\"To
pParentId\", \"b\".\"TotalBitrate\", \"b\".\"Type\", \"b\".\"UnratedType\", \"b\".\"Width\"
    FROM \"BaseItems\" AS \"b\"
    WHERE \"b\".\"Id\" IN (
        SELECT (
            SELECT \"b1\".\"Id\"
            FROM \"BaseItems\" AS \"b1\"
            WHERE \"b1\".\"IsFolder\" = @__filter_IsFolder_0 AND \"b1\".\"IsVirtualItem\" = @__isVirtualItem_Value_1 AND EXISTS (
                SELECT 1
                FROM \"AncestorIds\" AS \"a0\"
                WHERE \"b1\".\"Id\" = \"a0\".\"ItemId\" AND \"a0\".\"ParentItemId\" IN (
                    SELECT \"f0\".\"value\"
                    FROM json_each(@__filter_AncestorIds_2) AS \"f0\"
                )) AND (\"b0\".\"PresentationUniqueKey\" = \"b1\".\"PresentationUniqueKey\" OR (\"b0\".\"PresentationUniqueKey\" IS NULL AND \"b1\".\"PresentationUniqueKey\" IS NULL))
            LIMIT 1)
        FROM \"BaseItems\" AS \"b0\"
        WHERE \"b0\".\"IsFolder\" = @__filter_IsFolder_0 AND \"b0\".\"IsVirtualItem\" = @__isVirtualItem_Value_1 AND EXISTS (
            SELECT 1
            FROM \"AncestorIds\" AS \"a\"
            WHERE \"b0\".\"Id\" = \"a\".\"ItemId\" AND \"a\".\"ParentItemId\" IN (
                SELECT \"f\".\"value\"
                FROM json_each(@__filter_AncestorIds_2) AS \"f\"
            ))
        GROUP BY \"b0\".\"PresentationUniqueKey\"
    )
    ORDER BY \"b\".\"SortName\"
    LIMIT @__p_3
) AS \"b5\"
LEFT JOIN \"BaseItemTrailerTypes\" AS \"b2\" ON \"b5\".\"Id\" = \"b2\".\"ItemId\"
LEFT JOIN \"BaseItemProviders\" AS \"b3\" ON \"b5\".\"Id\" = \"b3\".\"ItemId\"
LEFT JOIN \"BaseItemMetadataFields\" AS \"b4\" ON \"b5\".\"Id\" = \"b4\".\"ItemId\"
LEFT JOIN \"UserData\" AS \"u\" ON \"b5\".\"Id\" = \"u\".\"ItemId\"
ORDER BY \"b5\".\"SortName\", \"b5\".\"Id\", \"b2\".\"Id\", \"b2\".\"ItemId\", \"b3\".\"ItemId\", \"b3\".\"ProviderId\", \"b4\".\"Id\", \"b4\".\"ItemId\", \"u\".\"ItemId\", \"u\".\"UserId\""

673 secs:

[2025-10-20 19:22:47.826 -04:00] [ERR] Failed executing DbCommand ("673,025"ms) [Parameters=["@__p_0='?' (Size = 586)"], CommandType='Text', CommandTimeout='30']"
""SELECT \"b\".\"Id\", \"b\".\"Album\", \"b\".\"AlbumArtists\", \"b\".\"Artists\", \"b\".\"Audio\", \"b\".\"ChannelId\", \"b\".\"CleanName\", \"b\".\"CommunityRating\", \"b\".\"CriticRating\", \"b\".\"CustomRating\", \"b\".\"Data\", \"b\".\"DateCreated\", \"b\".\"DateLastMediaAdded\", \"b\".\"DateLastRefreshed\", \"b\".\"DateLastSaved\", \"b\".\"DateModified\", \"b\".\"EndDate\", \"b\".\"EpisodeTitle\", \"b\".\"ExternalId\", \"b\".\"ExternalSeriesId\", \"b\".\"ExternalServiceId\", \"b\".\"ExtraIds\", \"b\".\"ExtraType\", \"b\".\"ForcedSortName\", \"b\".\"Genres\", \"b\".\"Height\", \"b\".\"IndexNumber\", \"b\".\"InheritedParentalRatingSubValue\", \"b\".\"InheritedParentalRatingValue\", \"b\".\"IsFolder\", \"b\".\"IsInMixedFolder\", \"b\".\"IsLocked\", \"b\".\"IsMovie\", \"b\".\"IsRepeat\", \"b\".\"IsSeries\", \"b\".\"IsVirtualItem\", \"b\".\"LUFS\", \"b\".\"MediaType\", \"b\".\"Name\", \"b\".\"NormalizationGain\", \"b\".\"OfficialRating\", \"b\".\"OriginalTitle\", \"b\".\"Overview\", \"b\".\"OwnerId\", \"b\".\"ParentId\", \"b\".\"ParentIndexNumber\", \"b\".\"Path\", \"b\".\"PreferredMetadataCountryCode\", \"b\".\"PreferredMetadataLanguage\", \"b\".\"PremiereDate\", \"b\".\"PresentationUniqueKey\", \"b\".\"PrimaryVersionId\", \"b\".\"ProductionLocations\", \"b\".\"ProductionYear\", \"b\".\"RunTimeTicks\", \"b\".\"SeasonId\", \"b\".\"SeasonName\", \"b\".\"SeriesId\", \"b\".\"SeriesName\", \"b\".\"SeriesPresentationUniqueKey\", \"b\".\"ShowId\", \"b\".\"Size\", \"b\".\"SortName\", \"b\".\"StartDate\", \"b\".\"Studios\", \"b\".\"Tagline\", \"b\".\"Tags\", \"b\".\"TopParentId\", \"b\".\"TotalBitrate\", \"b\".\"Type\", \"b\".\"UnratedType\", \"b\".\"Width\", \"b2\".\"Id\", \"b2\".\"ItemId\", \"b3\".\"ItemId\", \"b3\".\"ProviderId\", \"b3\".\"ProviderValue\", \"b4\".\"Id\", \"b4\".\"ItemId\", \"u\".\"ItemId\", \"u\".\"UserId\", \"u\".\"CustomDataKey\", \"u\".\"AudioStreamIndex\", \"u\".\"IsFavorite\", \"u\".\"LastPlayedDate\", \"u\".\"Likes\", \"u\".\"PlayCount\", \"u\".\"PlaybackPositionTicks\", \"u\".\"Played\", \"u\".\"Rating\", \"u\".\"RetentionDate\", \"u\".\"SubtitleStreamIndex\", \"b5\".\"Id\", \"b5\".\"Blurhash\", \"b5\".\"DateModified\", \"b5\".\"Height\", \"b5\".\"ImageType\", \"b5\".\"ItemId\", \"b5\".\"Path\", \"b5\".\"Width\"
FROM \"BaseItems\" AS \"b\"
LEFT JOIN \"BaseItemTrailerTypes\" AS \"b2\" ON \"b\".\"Id\" = \"b2\".\"ItemId\"
LEFT JOIN \"BaseItemProviders\" AS \"b3\" ON \"b\".\"Id\" = \"b3\".\"ItemId\"
LEFT JOIN \"BaseItemMetadataFields\" AS \"b4\" ON \"b\".\"Id\" = \"b4\".\"ItemId\"
LEFT JOIN \"UserData\" AS \"u\" ON \"b\".\"Id\" = \"u\".\"ItemId\"
LEFT JOIN \"BaseItemImageInfos\" AS \"b5\" ON \"b\".\"Id\" = \"b5\".\"ItemId\"
WHERE \"b\".\"Id\" IN (
    SELECT (
        SELECT \"b1\".\"Id\"
        FROM \"BaseItems\" AS \"b1\"
        WHERE \"b1\".\"Id\" IN (
            SELECT \"p0\".\"value\"
            FROM json_each(@__p_0) AS \"p0\"
        ) AND (\"b0\".\"PresentationUniqueKey\" = \"b1\".\"PresentationUniqueKey\" OR (\"b0\".\"PresentationUniqueKey\" IS NULL AND \"b1\".\"PresentationUniqueKey\" IS NULL))
        LIMIT 1)
    FROM \"BaseItems\" AS \"b0\"
    WHERE \"b0\".\"Id\" IN (
        SELECT \"p\".\"value\"
        FROM json_each(@__p_0) AS \"p\"
    )
    GROUP BY \"b0\".\"PresentationUniqueKey\"
)
ORDER BY \"b\".\"SortName\", \"b\".\"Id\", \"b2\".\"Id\", \"b2\".\"ItemId\", \"b3\".\"ItemId\", \"b3\".\"ProviderId\", \"b4\".\"Id\", \"b4\".\"ItemId\", \"u\".\"ItemId\", \"u\".\"UserId\", \"u\".\"CustomDataKey\""
@papavictor commented on GitHub (Oct 21, 2025): My last attempt of running Optimistic with 4 threads (12 cores) got the same issue and now won't boot, despite restarting jellyfin several times. I'll have to restore from backup a 4th time and attempt another upgrade. I've never had database slowness prior to this version. I've now had several queries timeout over 10 minutes. If lowering the scan count to 1 doesn't help, I'll have to downgrade until these queries are optimized. ```shell root@jellyfin:~# egrep "[0-9][0-9][0-9],[0-9]+\"ms" /var/log/jellyfin/jellyfin20251020.log [2025-10-20 19:15:01.397 -04:00] [ERR] Failed executing DbCommand ("148,770"ms) [Parameters=["@__item_Id_0='?' (DbType = Guid)"], CommandType='Text', CommandTimeout='30']" [2025-10-20 19:17:31.749 -04:00] [ERR] Failed executing DbCommand ("389,319"ms) [Parameters=["@p10='?' (DbType = Int32), @p0='?' (Size = 32), @p1='?' (Size = 4), @p2='?' (Size = 9), @p3='?' (DbType = DateTime), @p4='?' (DbType = DateTime), @p5='?' (DbType = DateTime), @p6='?' (Size = 36), @p7='?' (Size = 6), @p8='?' (DbType = Boolean), @p9='?' (DbType = Guid)"], CommandType='Text', CommandTimeout='30']" [2025-10-20 19:22:47.825 -04:00] [ERR] Failed executing DbCommand ("615,469"ms) [Parameters=["@__filter_IsFolder_0='?' (DbType = Boolean), @__isVirtualItem_Value_1='?' (DbType = Boolean), @__filter_AncestorIds_2='?' (Size = 40)"], CommandType='Text', CommandTimeout='30']" [2025-10-20 19:22:47.825 -04:00] [ERR] Failed executing DbCommand ("623,673"ms) [Parameters=["@__entity_Id_0='?' (DbType = Guid)"], CommandType='Text', CommandTimeout='30']" [2025-10-20 19:22:47.825 -04:00] [ERR] Failed executing DbCommand ("615,466"ms) [Parameters=["@__filter_IsFolder_0='?' (DbType = Boolean), @__isVirtualItem_Value_1='?' (DbType = Boolean), @__filter_AncestorIds_2='?' (Size = 40), @__p_3='?' (DbType = Int32)"], CommandType='Text', CommandTimeout='30']" [2025-10-20 19:22:47.826 -04:00] [ERR] Failed executing DbCommand ("615,280"ms) [Parameters=["@__p_0='?' (Size = 586)"], CommandType='Text', CommandTimeout='30']" [2025-10-20 19:22:47.826 -04:00] [ERR] Failed executing DbCommand ("673,025"ms) [Parameters=["@__p_0='?' (Size = 586)"], CommandType='Text', CommandTimeout='30']" [2025-10-20 19:22:47.826 -04:00] [ERR] Failed executing DbCommand ("615,475"ms) [Parameters=["@__p_0='?' (Size = 586)"], CommandType='Text', CommandTimeout='30']" [2025-10-20 19:22:47.826 -04:00] [ERR] Failed executing DbCommand ("615,284"ms) [Parameters=["@__filter_SeriesPresentationUniqueKey_0='?' (Size = 32)"], CommandType='Text', CommandTimeout='30']" [2025-10-20 19:22:47.826 -04:00] [ERR] Failed executing DbCommand ("615,281"ms) [Parameters=["@__p_0='?' (Size = 586)"], CommandType='Text', CommandTimeout='30']" [2025-10-20 19:22:47.826 -04:00] [ERR] Failed executing DbCommand ("615,277"ms) [Parameters=["@p10='?' (DbType = Int32), @p0='?' (Size = 32), @p1='?' (Size = 4), @p2='?' (Size = 9), @p3='?' (DbType = DateTime), @p4='?' (DbType = DateTime), @p5='?' (DbType = DateTime), @p6='?' (Size = 36), @p7='?' (Size = 6), @p8='?' (DbType = Boolean), @p9='?' (DbType = Guid)"], CommandType='Text', CommandTimeout='30']" [2025-10-20 19:22:47.826 -04:00] [ERR] Failed executing DbCommand ("615,285"ms) [Parameters=["@__isVirtualItem_Value_0='?' (DbType = Boolean), @__filter_SeriesPresentationUniqueKey_1='?' (Size = 32)"], CommandType='Text', CommandTimeout='30']" [2025-10-20 19:22:47.826 -04:00] [ERR] Failed executing DbCommand ("615,470"ms) [Parameters=["@__p_0='?' (Size = 586)"], CommandType='Text', CommandTimeout='30']" [2025-10-20 19:22:47.827 -04:00] [ERR] Failed executing DbCommand ("615,279"ms) [Parameters=["@__id_0='?' (DbType = Guid)"], CommandType='Text', CommandTimeout='30']" [2025-10-20 19:22:47.827 -04:00] [ERR] Failed executing DbCommand ("615,281"ms) [Parameters=["@__filter_ParentId_0='?' (DbType = Guid)"], CommandType='Text', CommandTimeout='30']" [2025-10-20 19:22:47.827 -04:00] [ERR] Failed executing DbCommand ("615,277"ms) [Parameters=["@__filter_ItemId_1='?' (DbType = Guid), @__filter_ItemId_0='?' (DbType = Guid)"], CommandType='Text', CommandTimeout='30']" [2025-10-20 19:22:47.827 -04:00] [ERR] Failed executing DbCommand ("615,278"ms) [Parameters=["@__filter_ItemId_1='?' (DbType = Guid), @__filter_ItemId_0='?' (DbType = Guid)"], CommandType='Text', CommandTimeout='30']" [2025-10-20 19:22:47.827 -04:00] [ERR] Failed executing DbCommand ("615,284"ms) [Parameters=["@__filter_IsFolder_0='?' (DbType = Boolean), @__isVirtualItem_Value_1='?' (DbType = Boolean), @__filter_AncestorIds_2='?' (Size = 40), @__p_3='?' (DbType = Int32)"], CommandType='Text', CommandTimeout='30']" [2025-10-20 19:22:47.827 -04:00] [ERR] Failed executing DbCommand ("615,277"ms) [Parameters=["@__p_0='?' (Size = 586)"], CommandType='Text', CommandTimeout='30']" [2025-10-20 19:22:47.827 -04:00] [ERR] Failed executing DbCommand ("615,279"ms) [Parameters=["@__filter_IsFolder_0='?' (DbType = Boolean), @__isVirtualItem_Value_1='?' (DbType = Boolean), @__filter_AncestorIds_2='?' (Size = 40)"], CommandType='Text', CommandTimeout='30']" [2025-10-20 19:22:47.827 -04:00] [ERR] Failed executing DbCommand ("615,279"ms) [Parameters=["@__filter_ParentId_0='?' (DbType = Guid)"], CommandType='Text', CommandTimeout='30']" [2025-10-20 19:22:47.829 -04:00] [ERR] Failed executing DbCommand ("615,280"ms) [Parameters=["@__item_Id_0='?' (DbType = Guid)"], CommandType='Text', CommandTimeout='30']" [2025-10-20 19:22:47.829 -04:00] [ERR] Failed executing DbCommand ("615,272"ms) [Parameters=["@__id_0='?' (DbType = Guid)"], CommandType='Text', CommandTimeout='30']" [2025-10-20 19:22:47.830 -04:00] [ERR] Failed executing DbCommand ("615,266"ms) [Parameters=["@__filter_IsFolder_0='?' (DbType = Boolean), @__isVirtualItem_Value_1='?' (DbType = Boolean), @__filter_AncestorIds_2='?' (Size = 40), @__p_3='?' (DbType = Int32)"], CommandType='Text', CommandTimeout='30']" [2025-10-20 19:22:47.830 -04:00] [ERR] Failed executing DbCommand ("615,265"ms) [Parameters=["@__id_0='?' (DbType = Guid)"], CommandType='Text', CommandTimeout='30']" [2025-10-20 19:22:47.832 -04:00] [ERR] Failed executing DbCommand ("615,266"ms) [Parameters=["@__item_Id_0='?' (DbType = Guid)"], CommandType='Text', CommandTimeout='30']" [2025-10-20 19:22:56.410 -04:00] [ERR] Failed executing DbCommand ("623,805"ms) [Parameters=["@__isVirtualItem_Value_0='?' (DbType = Boolean), @__filter_SeriesPresentationUniqueKey_1='?' (Size = 32)"], CommandType='Text', CommandTimeout='30']" [2025-10-20 19:22:56.410 -04:00] [ERR] Failed executing DbCommand ("623,834"ms) [Parameters=["@__filter_AncestorIds_0='?' (Size = 40)"], CommandType='Text', CommandTimeout='30']" [2025-10-20 19:22:58.863 -04:00] [ERR] Failed executing DbCommand ("626,386"ms) [Parameters=["@__filter_ParentId_0='?' (DbType = Guid)"], CommandType='Text', CommandTimeout='30']" [2025-10-20 19:22:58.863 -04:00] [ERR] Failed executing DbCommand ("626,392"ms) [Parameters=["@__p_0='?' (Size = 586)"], CommandType='Text', CommandTimeout='30']" [2025-10-20 19:23:09.748 -04:00] [ERR] Failed executing DbCommand ("637,193"ms) [Parameters=["@__filter_IsFolder_0='?' (DbType = Boolean), @__isVirtualItem_Value_1='?' (DbType = Boolean), @__filter_AncestorIds_2='?' (Size = 40)"], CommandType='Text', CommandTimeout='30']" [2025-10-20 19:23:09.748 -04:00] [ERR] Failed executing DbCommand ("637,199"ms) [Parameters=["@__filter_ParentId_0='?' (DbType = Guid)"], CommandType='Text', CommandTimeout='30']" [2025-10-20 19:23:12.024 -04:00] [ERR] Failed executing DbCommand ("624,830"ms) [Parameters=["@__filter_AncestorIds_0='?' (Size = 40)"], CommandType='Text', CommandTimeout='30']" [2025-10-20 19:23:13.058 -04:00] [ERR] Failed executing DbCommand ("640,504"ms) [Parameters=["@__isVirtualItem_Value_0='?' (DbType = Boolean), @__filter_SeriesPresentationUniqueKey_1='?' (Size = 32)"], CommandType='Text', CommandTimeout='30']" ``` 615secs: ```shell [2025-10-20 19:22:47.825 -04:00] [ERR] Failed executing DbCommand ("615,466"ms) [Parameters=["@__filter_IsFolder_0='?' (DbType = Boolean), @__isVirtualItem_Value_1='?' (DbType = Boolean), @__filter_AncestorIds_2='?' (Size = 40), @__p_3='?' (DbType = Int32)"], CommandType='Text', CommandTimeout='30']" ""SELECT \"b5\".\"Id\", \"b5\".\"Album\", \"b5\".\"AlbumArtists\", \"b5\".\"Artists\", \"b5\".\"Audio\", \"b5\".\"ChannelId\", \"b5\".\"CleanName\", \"b5\".\"CommunityRating\", \"b5\".\"CriticRating\", \"b5\".\"CustomRating\", \"b5\".\"Data\", \"b5\".\"DateCreated\", \"b5\".\"DateLastMediaAdded\", \"b5\".\"DateLastRe freshed\", \"b5\".\"DateLastSaved\", \"b5\".\"DateModified\", \"b5\".\"EndDate\", \"b5\".\"EpisodeTitle\", \"b5\".\"ExternalId\", \"b5\".\"ExternalSeriesId\", \"b5\".\"ExternalServiceId\", \"b5\".\"ExtraIds\", \"b5\".\"ExtraType\", \"b5\".\"ForcedSortName\", \"b5\".\"Genres\", \"b5\".\"Height\", \"b5\".\"IndexNumber\ ", \"b5\".\"InheritedParentalRatingSubValue\", \"b5\".\"InheritedParentalRatingValue\", \"b5\".\"IsFolder\", \"b5\".\"IsInMixedFolder\", \"b5\".\"IsLocked\", \"b5\".\"IsMovie\", \"b5\".\"IsRepeat\", \"b5\".\"IsSeries\", \"b5\".\"IsVirtualItem\", \"b5\".\"LUFS\", \"b5\".\"MediaType\", \"b5\".\"Name\", \"b5\".\"Normali zationGain\", \"b5\".\"OfficialRating\", \"b5\".\"OriginalTitle\", \"b5\".\"Overview\", \"b5\".\"OwnerId\", \"b5\".\"ParentId\", \"b5\".\"ParentIndexNumber\", \"b5\".\"Path\", \"b5\".\"PreferredMetadataCountryCode\", \"b5\".\"PreferredMetadataLanguage\", \"b5\".\"PremiereDate\", \"b5\".\"PresentationUniqueKey\", \"b5 \".\"PrimaryVersionId\", \"b5\".\"ProductionLocations\", \"b5\".\"ProductionYear\", \"b5\".\"RunTimeTicks\", \"b5\".\"SeasonId\", \"b5\".\"SeasonName\", \"b5\".\"SeriesId\", \"b5\".\"SeriesName\", \"b5\".\"SeriesPresentationUniqueKey\", \"b5\".\"ShowId\", \"b5\".\"Size\", \"b5\".\"SortName\", \"b5\".\"StartDate\", \" b5\".\"Studios\", \"b5\".\"Tagline\", \"b5\".\"Tags\", \"b5\".\"TopParentId\", \"b5\".\"TotalBitrate\", \"b5\".\"Type\", \"b5\".\"UnratedType\", \"b5\".\"Width\", \"b2\".\"Id\", \"b2\".\"ItemId\", \"b3\".\"ItemId\", \"b3\".\"ProviderId\", \"b3\".\"ProviderValue\", \"b4\".\"Id\", \"b4\".\"ItemId\", \"u\".\"ItemId\", \ "u\".\"UserId\", \"u\".\"CustomDataKey\", \"u\".\"AudioStreamIndex\", \"u\".\"IsFavorite\", \"u\".\"LastPlayedDate\", \"u\".\"Likes\", \"u\".\"PlayCount\", \"u\".\"PlaybackPositionTicks\", \"u\".\"Played\", \"u\".\"Rating\", \"u\".\"RetentionDate\", \"u\".\"SubtitleStreamIndex\" FROM ( SELECT \"b\".\"Id\", \"b\".\"Album\", \"b\".\"AlbumArtists\", \"b\".\"Artists\", \"b\".\"Audio\", \"b\".\"ChannelId\", \"b\".\"CleanName\", \"b\".\"CommunityRating\", \"b\".\"CriticRating\", \"b\".\"CustomRating\", \"b\".\"Data\", \"b\".\"DateCreated\", \"b\".\"DateLastMediaAdded\", \"b\".\"DateLastRefreshed\", \ "b\".\"DateLastSaved\", \"b\".\"DateModified\", \"b\".\"EndDate\", \"b\".\"EpisodeTitle\", \"b\".\"ExternalId\", \"b\".\"ExternalSeriesId\", \"b\".\"ExternalServiceId\", \"b\".\"ExtraIds\", \"b\".\"ExtraType\", \"b\".\"ForcedSortName\", \"b\".\"Genres\", \"b\".\"Height\", \"b\".\"IndexNumber\", \"b\".\"InheritedParen talRatingSubValue\", \"b\".\"InheritedParentalRatingValue\", \"b\".\"IsFolder\", \"b\".\"IsInMixedFolder\", \"b\".\"IsLocked\", \"b\".\"IsMovie\", \"b\".\"IsRepeat\", \"b\".\"IsSeries\", \"b\".\"IsVirtualItem\", \"b\".\"LUFS\", \"b\".\"MediaType\", \"b\".\"Name\", \"b\".\"NormalizationGain\", \"b\".\"OfficialRating\" , \"b\".\"OriginalTitle\", \"b\".\"Overview\", \"b\".\"OwnerId\", \"b\".\"ParentId\", \"b\".\"ParentIndexNumber\", \"b\".\"Path\", \"b\".\"PreferredMetadataCountryCode\", \"b\".\"PreferredMetadataLanguage\", \"b\".\"PremiereDate\", \"b\".\"PresentationUniqueKey\", \"b\".\"PrimaryVersionId\", \"b\".\"ProductionLocatio ns\", \"b\".\"ProductionYear\", \"b\".\"RunTimeTicks\", \"b\".\"SeasonId\", \"b\".\"SeasonName\", \"b\".\"SeriesId\", \"b\".\"SeriesName\", \"b\".\"SeriesPresentationUniqueKey\", \"b\".\"ShowId\", \"b\".\"Size\", \"b\".\"SortName\", \"b\".\"StartDate\", \"b\".\"Studios\", \"b\".\"Tagline\", \"b\".\"Tags\", \"b\".\"To pParentId\", \"b\".\"TotalBitrate\", \"b\".\"Type\", \"b\".\"UnratedType\", \"b\".\"Width\" FROM \"BaseItems\" AS \"b\" WHERE \"b\".\"Id\" IN ( SELECT ( SELECT \"b1\".\"Id\" FROM \"BaseItems\" AS \"b1\" WHERE \"b1\".\"IsFolder\" = @__filter_IsFolder_0 AND \"b1\".\"IsVirtualItem\" = @__isVirtualItem_Value_1 AND EXISTS ( SELECT 1 FROM \"AncestorIds\" AS \"a0\" WHERE \"b1\".\"Id\" = \"a0\".\"ItemId\" AND \"a0\".\"ParentItemId\" IN ( SELECT \"f0\".\"value\" FROM json_each(@__filter_AncestorIds_2) AS \"f0\" )) AND (\"b0\".\"PresentationUniqueKey\" = \"b1\".\"PresentationUniqueKey\" OR (\"b0\".\"PresentationUniqueKey\" IS NULL AND \"b1\".\"PresentationUniqueKey\" IS NULL)) LIMIT 1) FROM \"BaseItems\" AS \"b0\" WHERE \"b0\".\"IsFolder\" = @__filter_IsFolder_0 AND \"b0\".\"IsVirtualItem\" = @__isVirtualItem_Value_1 AND EXISTS ( SELECT 1 FROM \"AncestorIds\" AS \"a\" WHERE \"b0\".\"Id\" = \"a\".\"ItemId\" AND \"a\".\"ParentItemId\" IN ( SELECT \"f\".\"value\" FROM json_each(@__filter_AncestorIds_2) AS \"f\" )) GROUP BY \"b0\".\"PresentationUniqueKey\" ) ORDER BY \"b\".\"SortName\" LIMIT @__p_3 ) AS \"b5\" LEFT JOIN \"BaseItemTrailerTypes\" AS \"b2\" ON \"b5\".\"Id\" = \"b2\".\"ItemId\" LEFT JOIN \"BaseItemProviders\" AS \"b3\" ON \"b5\".\"Id\" = \"b3\".\"ItemId\" LEFT JOIN \"BaseItemMetadataFields\" AS \"b4\" ON \"b5\".\"Id\" = \"b4\".\"ItemId\" LEFT JOIN \"UserData\" AS \"u\" ON \"b5\".\"Id\" = \"u\".\"ItemId\" ORDER BY \"b5\".\"SortName\", \"b5\".\"Id\", \"b2\".\"Id\", \"b2\".\"ItemId\", \"b3\".\"ItemId\", \"b3\".\"ProviderId\", \"b4\".\"Id\", \"b4\".\"ItemId\", \"u\".\"ItemId\", \"u\".\"UserId\"" ``` 673 secs: ```shell [2025-10-20 19:22:47.826 -04:00] [ERR] Failed executing DbCommand ("673,025"ms) [Parameters=["@__p_0='?' (Size = 586)"], CommandType='Text', CommandTimeout='30']" ""SELECT \"b\".\"Id\", \"b\".\"Album\", \"b\".\"AlbumArtists\", \"b\".\"Artists\", \"b\".\"Audio\", \"b\".\"ChannelId\", \"b\".\"CleanName\", \"b\".\"CommunityRating\", \"b\".\"CriticRating\", \"b\".\"CustomRating\", \"b\".\"Data\", \"b\".\"DateCreated\", \"b\".\"DateLastMediaAdded\", \"b\".\"DateLastRefreshed\", \"b\".\"DateLastSaved\", \"b\".\"DateModified\", \"b\".\"EndDate\", \"b\".\"EpisodeTitle\", \"b\".\"ExternalId\", \"b\".\"ExternalSeriesId\", \"b\".\"ExternalServiceId\", \"b\".\"ExtraIds\", \"b\".\"ExtraType\", \"b\".\"ForcedSortName\", \"b\".\"Genres\", \"b\".\"Height\", \"b\".\"IndexNumber\", \"b\".\"InheritedParentalRatingSubValue\", \"b\".\"InheritedParentalRatingValue\", \"b\".\"IsFolder\", \"b\".\"IsInMixedFolder\", \"b\".\"IsLocked\", \"b\".\"IsMovie\", \"b\".\"IsRepeat\", \"b\".\"IsSeries\", \"b\".\"IsVirtualItem\", \"b\".\"LUFS\", \"b\".\"MediaType\", \"b\".\"Name\", \"b\".\"NormalizationGain\", \"b\".\"OfficialRating\", \"b\".\"OriginalTitle\", \"b\".\"Overview\", \"b\".\"OwnerId\", \"b\".\"ParentId\", \"b\".\"ParentIndexNumber\", \"b\".\"Path\", \"b\".\"PreferredMetadataCountryCode\", \"b\".\"PreferredMetadataLanguage\", \"b\".\"PremiereDate\", \"b\".\"PresentationUniqueKey\", \"b\".\"PrimaryVersionId\", \"b\".\"ProductionLocations\", \"b\".\"ProductionYear\", \"b\".\"RunTimeTicks\", \"b\".\"SeasonId\", \"b\".\"SeasonName\", \"b\".\"SeriesId\", \"b\".\"SeriesName\", \"b\".\"SeriesPresentationUniqueKey\", \"b\".\"ShowId\", \"b\".\"Size\", \"b\".\"SortName\", \"b\".\"StartDate\", \"b\".\"Studios\", \"b\".\"Tagline\", \"b\".\"Tags\", \"b\".\"TopParentId\", \"b\".\"TotalBitrate\", \"b\".\"Type\", \"b\".\"UnratedType\", \"b\".\"Width\", \"b2\".\"Id\", \"b2\".\"ItemId\", \"b3\".\"ItemId\", \"b3\".\"ProviderId\", \"b3\".\"ProviderValue\", \"b4\".\"Id\", \"b4\".\"ItemId\", \"u\".\"ItemId\", \"u\".\"UserId\", \"u\".\"CustomDataKey\", \"u\".\"AudioStreamIndex\", \"u\".\"IsFavorite\", \"u\".\"LastPlayedDate\", \"u\".\"Likes\", \"u\".\"PlayCount\", \"u\".\"PlaybackPositionTicks\", \"u\".\"Played\", \"u\".\"Rating\", \"u\".\"RetentionDate\", \"u\".\"SubtitleStreamIndex\", \"b5\".\"Id\", \"b5\".\"Blurhash\", \"b5\".\"DateModified\", \"b5\".\"Height\", \"b5\".\"ImageType\", \"b5\".\"ItemId\", \"b5\".\"Path\", \"b5\".\"Width\" FROM \"BaseItems\" AS \"b\" LEFT JOIN \"BaseItemTrailerTypes\" AS \"b2\" ON \"b\".\"Id\" = \"b2\".\"ItemId\" LEFT JOIN \"BaseItemProviders\" AS \"b3\" ON \"b\".\"Id\" = \"b3\".\"ItemId\" LEFT JOIN \"BaseItemMetadataFields\" AS \"b4\" ON \"b\".\"Id\" = \"b4\".\"ItemId\" LEFT JOIN \"UserData\" AS \"u\" ON \"b\".\"Id\" = \"u\".\"ItemId\" LEFT JOIN \"BaseItemImageInfos\" AS \"b5\" ON \"b\".\"Id\" = \"b5\".\"ItemId\" WHERE \"b\".\"Id\" IN ( SELECT ( SELECT \"b1\".\"Id\" FROM \"BaseItems\" AS \"b1\" WHERE \"b1\".\"Id\" IN ( SELECT \"p0\".\"value\" FROM json_each(@__p_0) AS \"p0\" ) AND (\"b0\".\"PresentationUniqueKey\" = \"b1\".\"PresentationUniqueKey\" OR (\"b0\".\"PresentationUniqueKey\" IS NULL AND \"b1\".\"PresentationUniqueKey\" IS NULL)) LIMIT 1) FROM \"BaseItems\" AS \"b0\" WHERE \"b0\".\"Id\" IN ( SELECT \"p\".\"value\" FROM json_each(@__p_0) AS \"p\" ) GROUP BY \"b0\".\"PresentationUniqueKey\" ) ORDER BY \"b\".\"SortName\", \"b\".\"Id\", \"b2\".\"Id\", \"b2\".\"ItemId\", \"b3\".\"ItemId\", \"b3\".\"ProviderId\", \"b4\".\"Id\", \"b4\".\"ItemId\", \"u\".\"ItemId\", \"u\".\"UserId\", \"u\".\"CustomDataKey\"" ```
Author
Owner

@Casuallynoted commented on GitHub (Oct 21, 2025):

Getting a ton of "SQLite Error 6: 'database table is locked: UserData'." in my logs and locking up of the UI after the update to 10.11. Persists after several restarts.

@Casuallynoted commented on GitHub (Oct 21, 2025): Getting a ton of "SQLite Error 6: 'database table is locked: UserData'." in my logs and locking up of the UI after the update to 10.11. Persists after several restarts.
Author
Owner

@Kitt3120 commented on GitHub (Oct 21, 2025):

I let it run overnight, and now I can't access the web interface anymore. The login times out. Logs are full of this, but no other errors:

jellyfin-1  | [18:23:44] [ERR] [222] MediaBrowser.Providers.Subtitles.SubtitleManager: Error downloading subtitles from Open Subtitles
jellyfin-1  | System.ObjectDisposedException: Cannot access a disposed object.
jellyfin-1  | Object name: 'FixedWindowRateLimiter'.
jellyfin-1  |    at System.Threading.RateLimiting.FixedWindowRateLimiter.AcquireAsyncCore(Int32 permitCount, CancellationToken cancellationToken)
jellyfin-1  |    at Jellyfin.Plugin.OpenSubtitles.ClientSideRateLimitedHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
jellyfin-1  |    at Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler.<SendCoreAsync>g__Core|4_0(HttpRequestMessage request, Boolean useAsync, CancellationToken cancellationToken)
jellyfin-1  |    at Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.<SendCoreAsync>g__Core|4_0(HttpRequestMessage request, Boolean useAsync, CancellationToken cancellationToken)
jellyfin-1  |    at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
jellyfin-1  |    at Jellyfin.Plugin.OpenSubtitles.OpenSubtitlesHandler.OpenSubtitlesRequestHelper.SendRequestAsync(String url, HttpMethod method, Object body, Dictionary`2 headers, CancellationToken cancellationToken)
jellyfin-1  |    at Jellyfin.Plugin.OpenSubtitles.OpenSubtitlesHandler.RequestHandler.SendRequestAsync(String endpoint, HttpMethod method, Object body, Dictionary`2 headers, Int32 attempt, CancellationToken cancellationToken)
jellyfin-1  |    at Jellyfin.Plugin.OpenSubtitles.OpenSubtitlesHandler.OpenSubtitlesApi.SearchSubtitlesAsync(Dictionary`2 options, CancellationToken cancellationToken)
jellyfin-1  |    at Jellyfin.Plugin.OpenSubtitles.OpenSubtitleDownloader.Search(SubtitleSearchRequest request, CancellationToken cancellationToken)
jellyfin-1  |    at MediaBrowser.Providers.Subtitles.SubtitleManager.SearchSubtitles(SubtitleSearchRequest request, CancellationToken cancellationToken)
@Kitt3120 commented on GitHub (Oct 21, 2025): I let it run overnight, and now I can't access the web interface anymore. The login times out. Logs are full of this, but no other errors: ``` jellyfin-1 | [18:23:44] [ERR] [222] MediaBrowser.Providers.Subtitles.SubtitleManager: Error downloading subtitles from Open Subtitles jellyfin-1 | System.ObjectDisposedException: Cannot access a disposed object. jellyfin-1 | Object name: 'FixedWindowRateLimiter'. jellyfin-1 | at System.Threading.RateLimiting.FixedWindowRateLimiter.AcquireAsyncCore(Int32 permitCount, CancellationToken cancellationToken) jellyfin-1 | at Jellyfin.Plugin.OpenSubtitles.ClientSideRateLimitedHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) jellyfin-1 | at Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler.<SendCoreAsync>g__Core|4_0(HttpRequestMessage request, Boolean useAsync, CancellationToken cancellationToken) jellyfin-1 | at Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.<SendCoreAsync>g__Core|4_0(HttpRequestMessage request, Boolean useAsync, CancellationToken cancellationToken) jellyfin-1 | at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken) jellyfin-1 | at Jellyfin.Plugin.OpenSubtitles.OpenSubtitlesHandler.OpenSubtitlesRequestHelper.SendRequestAsync(String url, HttpMethod method, Object body, Dictionary`2 headers, CancellationToken cancellationToken) jellyfin-1 | at Jellyfin.Plugin.OpenSubtitles.OpenSubtitlesHandler.RequestHandler.SendRequestAsync(String endpoint, HttpMethod method, Object body, Dictionary`2 headers, Int32 attempt, CancellationToken cancellationToken) jellyfin-1 | at Jellyfin.Plugin.OpenSubtitles.OpenSubtitlesHandler.OpenSubtitlesApi.SearchSubtitlesAsync(Dictionary`2 options, CancellationToken cancellationToken) jellyfin-1 | at Jellyfin.Plugin.OpenSubtitles.OpenSubtitleDownloader.Search(SubtitleSearchRequest request, CancellationToken cancellationToken) jellyfin-1 | at MediaBrowser.Providers.Subtitles.SubtitleManager.SearchSubtitles(SubtitleSearchRequest request, CancellationToken cancellationToken) ```
Author
Owner

@appletalk commented on GitHub (Oct 22, 2025):

I ran into these same issues (I have ZFS backed storage but not proxmox). I think my instance is running well using the following steps.
Rollback to pre-10.11.0 install and stop the container.
Update to 10.11.0 and let the upgrade complete so the web interface loads.
Once loaded shutdown the updated Jellyfin container BEFORE letting a library scan run.
Change the database.xml to Opportunistic locking.
Start the container up again and run a full library scan.

This seems to have resulted in a running Jellyfin instance on 10.11.0

@appletalk commented on GitHub (Oct 22, 2025): I ran into these same issues (I have ZFS backed storage but not proxmox). I think my instance is running well using the following steps. Rollback to pre-10.11.0 install and stop the container. Update to 10.11.0 and let the upgrade complete so the web interface loads. Once loaded shutdown the updated Jellyfin container *BEFORE* letting a library scan run. Change the database.xml to Opportunistic locking. Start the container up again and run a full library scan. This seems to have resulted in a running Jellyfin instance on 10.11.0
Author
Owner

@papavictor commented on GitHub (Oct 22, 2025):

@Kitt3120 I had to disable my OpenSubtitles plugin, I originally thought it contributed to the issue, as I had hundreds of those entries in my log, too. On the last release, I believe after the 5 free downloads, the 6th attempt would give an error then the plugin would stop. But prior to that, this issue existed previously, where it would continue to attempt even if the results were failures.

I also left my full library scan running with Optimistic and a single parallel scan task overnight. It hasn't moved from 85% in over 20 hours, though I no longer have "database table locked" messages. I suspect this is just very slow at scanning music, as that's where most of my errors were previously, and I have > 100k songs.

edit:

Just noticed that none of my Android clients are able to load the UI, though my desktop works okay, and Kodi is still playing files. I restarted jellyfin, and my android clients are still unable to login.

@papavictor commented on GitHub (Oct 22, 2025): @Kitt3120 I had to disable my OpenSubtitles plugin, I originally thought it contributed to the issue, as I had hundreds of those entries in my log, too. On the last release, I believe after the 5 free downloads, the 6th attempt would give an error then the plugin would stop. But prior to that, this issue existed previously, where it would continue to attempt even if the results were failures. I also left my full library scan running with Optimistic and a single parallel scan task overnight. It hasn't moved from 85% in over 20 hours, though I no longer have "database table locked" messages. I suspect this is just very slow at scanning music, as that's where most of my errors were previously, and I have > 100k songs. edit: Just noticed that none of my Android clients are able to load the UI, though my desktop works okay, and Kodi is still playing files. I restarted jellyfin, and my android clients are still unable to login.
Author
Owner

@papavictor commented on GitHub (Oct 23, 2025):

@JPVenson I see issue group #15101 opened for this, but my filesystem is ext4, not zfs. I'm running a second full scan, and the behavior is the same, 20h at 85%. Will this be the case with every scheduled full library scan, or is this just part of the migration / db cleanup?

@papavictor commented on GitHub (Oct 23, 2025): @JPVenson I see issue group #15101 opened for this, but my filesystem is ext4, not zfs. I'm running a second full scan, and the behavior is the same, 20h at 85%. Will this be the case with every scheduled full library scan, or is this just part of the migration / db cleanup?
Author
Owner

@papavictor commented on GitHub (Oct 23, 2025):

Looks like a new scan kicked off while the other one was running. Not sure if it finished independently, or there was a race condition that caused it to stop prematurely. It was still at 85% up to this point.

[2025-10-22 23:54:20.527 -04:00] [INF] "Scan Media Library" Completed after 1306 minute(s) and 46 seconds

@papavictor commented on GitHub (Oct 23, 2025): Looks like a new scan kicked off while the other one was running. Not sure if it finished independently, or there was a race condition that caused it to stop prematurely. It was still at 85% up to this point. `[2025-10-22 23:54:20.527 -04:00] [INF] "Scan Media Library" Completed after 1306 minute(s) and 46 seconds `
Author
Owner

@felix920506 commented on GitHub (Oct 23, 2025):

@papavictor are you having those problems even after setting locking mode to pessimistic?

@felix920506 commented on GitHub (Oct 23, 2025): @papavictor are you having those problems even after setting locking mode to pessimistic?
Author
Owner

@teian commented on GitHub (Oct 23, 2025):

Getting the same issue when triggering a library scan

   at Microsoft.Data.Sqlite.SqliteConnection.Open()
   at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenInternal(Boolean errorsExpected)
   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReader(RelationalCommandParameterObject parameterObject)
   at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.Enumerator.InitializeReader(Enumerator enumerator)
   at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.Enumerator.MoveNext()
   at System.Linq.Enumerable.TryGetSingle[TSource](IEnumerable`1 source, Boolean& found)
   at lambda_method34229(Closure, QueryContext)
   at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.ExecuteCore[TResult](Expression query, Boolean async, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.Execute[TResult](Expression query)
   at Jellyfin.Server.Implementations.Item.BaseItemRepository.RetrieveItem(Guid id)
   at Emby.Server.Implementations.Library.LibraryManager.GetItemById[T](Guid id, Guid userId)
   at Jellyfin.Api.Controllers.ImageController.GetItemImage(Guid itemId, ImageType imageType, Nullable`1 maxWidth, Nullable`1 maxHeight, Nullable`1 width, Nullable`1 height, Nullable`1 quality, Nullable`1 fillWidth, Nullable`1 fillHeight, String tag, Nullable`1 format, Nullable`1 percentPlayed, Nullable`1 unplayedCount, Nullable`1 blur, String backgroundColor, String foregroundLayer, Nullable`1 imageIndex)
   at lambda_method43121(Closure, Object)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Jellyfin.Api.Middleware.ServerStartupMessageMiddleware.Invoke(HttpContext httpContext, IServerApplicationHost serverApplicationHost, ILocalizationManager localizationManager)
   at Jellyfin.Api.Middleware.WebSocketHandlerMiddleware.Invoke(HttpContext httpContext, IWebSocketManager webSocketManager)
   at Jellyfin.Api.Middleware.IPBasedAccessValidationMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Jellyfin.Api.Middleware.QueryStringDecodingMiddleware.Invoke(HttpContext httpContext)
   at Swashbuckle.AspNetCore.ReDoc.ReDocMiddleware.Invoke(HttpContext httpContext)
   at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
   at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Jellyfin.Api.Middleware.RobotsRedirectionMiddleware.Invoke(HttpContext httpContext)
   at Jellyfin.Api.Middleware.LegacyEmbyRouteRewriteMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context)
   at Jellyfin.Api.Middleware.ResponseTimeMiddleware.Invoke(HttpContext context, IServerConfigurationManager serverConfigurationManager)
   at Jellyfin.Api.Middleware.ExceptionMiddleware.Invoke(HttpContext context)```
@teian commented on GitHub (Oct 23, 2025): Getting the same issue when triggering a library scan ```Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'database is locked For more information on this error code see https://www.sqlite.org/rescode.html'. at Microsoft.Data.Sqlite.SqliteConnection.Open() at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenInternal(Boolean errorsExpected) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReader(RelationalCommandParameterObject parameterObject) at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.Enumerator.InitializeReader(Enumerator enumerator) at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.Enumerator.MoveNext() at System.Linq.Enumerable.TryGetSingle[TSource](IEnumerable`1 source, Boolean& found) at lambda_method34229(Closure, QueryContext) at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.ExecuteCore[TResult](Expression query, Boolean async, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.Execute[TResult](Expression query) at Jellyfin.Server.Implementations.Item.BaseItemRepository.RetrieveItem(Guid id) at Emby.Server.Implementations.Library.LibraryManager.GetItemById[T](Guid id, Guid userId) at Jellyfin.Api.Controllers.ImageController.GetItemImage(Guid itemId, ImageType imageType, Nullable`1 maxWidth, Nullable`1 maxHeight, Nullable`1 width, Nullable`1 height, Nullable`1 quality, Nullable`1 fillWidth, Nullable`1 fillHeight, String tag, Nullable`1 format, Nullable`1 percentPlayed, Nullable`1 unplayedCount, Nullable`1 blur, String backgroundColor, String foregroundLayer, Nullable`1 imageIndex) at lambda_method43121(Closure, Object) at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope) at Jellyfin.Api.Middleware.ServerStartupMessageMiddleware.Invoke(HttpContext httpContext, IServerApplicationHost serverApplicationHost, ILocalizationManager localizationManager) at Jellyfin.Api.Middleware.WebSocketHandlerMiddleware.Invoke(HttpContext httpContext, IWebSocketManager webSocketManager) at Jellyfin.Api.Middleware.IPBasedAccessValidationMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager) at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context) at Jellyfin.Api.Middleware.QueryStringDecodingMiddleware.Invoke(HttpContext httpContext) at Swashbuckle.AspNetCore.ReDoc.ReDocMiddleware.Invoke(HttpContext httpContext) at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext) at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider) at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Jellyfin.Api.Middleware.RobotsRedirectionMiddleware.Invoke(HttpContext httpContext) at Jellyfin.Api.Middleware.LegacyEmbyRouteRewriteMiddleware.Invoke(HttpContext httpContext) at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context) at Jellyfin.Api.Middleware.ResponseTimeMiddleware.Invoke(HttpContext context, IServerConfigurationManager serverConfigurationManager) at Jellyfin.Api.Middleware.ExceptionMiddleware.Invoke(HttpContext context)```
Author
Owner

@papavictor commented on GitHub (Oct 23, 2025):

@felix920506 my most recent full library scan ran 21+ hours in Optimistic mode with 1 scan task, but I didn't get the database locked error message. Is pessimistic likely to do any better? I'll run it today and report back.

@papavictor commented on GitHub (Oct 23, 2025): @felix920506 my most recent full library scan ran 21+ hours in Optimistic mode with 1 scan task, but I didn't get the database locked error message. Is pessimistic likely to do any better? I'll run it today and report back.
Author
Owner

@felix920506 commented on GitHub (Oct 23, 2025):

Pessimistic will be slower but less likely to hit database locked errors

@felix920506 commented on GitHub (Oct 23, 2025): Pessimistic will be slower but less likely to hit database locked errors
Author
Owner

@Kitt3120 commented on GitHub (Oct 23, 2025):

Been a couple of days. Still using Optimistic and the low parallel scan task limit of 1. The initial, problematic library scan finished after >24 hours. Since then, Jellyfin has been working fine for me. Everything is as fast as it is supposed to be again. Another library scan ran 18 hours ago, and it finished in 4 minutes. That's a huge difference in duration. I can't reproduce the behaviour right now. I did not restart the container since then. It just works now and I don't want to break it again x)

@Kitt3120 commented on GitHub (Oct 23, 2025): Been a couple of days. Still using Optimistic and the low parallel scan task limit of 1. The initial, problematic library scan finished after >24 hours. Since then, Jellyfin has been working fine for me. Everything is as fast as it is supposed to be again. Another library scan ran 18 hours ago, and it finished in 4 minutes. That's a huge difference in duration. I can't reproduce the behaviour right now. I did not restart the container since then. It just works now and I don't want to break it again x)
Author
Owner

@papavictor commented on GitHub (Oct 23, 2025):

After my first scan completed (or was interrupted?), my second scan with Pessimistic is still running, 9 hours as of this point. But I managed to get my android clients to login and load the UI by clearing the app cache.

@papavictor commented on GitHub (Oct 23, 2025): After my first scan completed (or was interrupted?), my second scan with Pessimistic is still running, 9 hours as of this point. But I managed to get my android clients to login and load the UI by clearing the app cache.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#7457