[Issue]: Error during Media Scan: SQLite Error 6: 'database table is locked'. JellyFin 10.9.2 #5863

Closed
opened 2026-02-07 02:28:17 +03:00 by OVERLORD · 16 comments
Owner

Originally created by @derterboy on GitHub (May 26, 2024).

Please describe your bug

Media Scan aborting with an error after ~37 minutes. Its only movies and tvshows libraries (really large ones).

Reproduction Steps

  1. Starting a Media Scan on a large Media collection

Jellyfin Version

10.9.0

if other:

10.9.2

Environment

- OS: Ubuntu 22
- Linux Kernel: 6.5.0-35-generic x86_64
- Storage: Fuse Mount

Jellyfin logs

[2024-05-26 01:37:52.134 +00:00] [ERR] Error in "Probe Provider"
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.SqliteTransaction..ctor(SqliteConnection connection, IsolationLevel isolationLevel, Boolean deferred)
   at Emby.Server.Implementations.Data.SqliteItemRepository.SaveMediaStreams(Guid id, IReadOnlyList`1 streams, CancellationToken cancellationToken)
   at MediaBrowser.Providers.MediaInfo.FFProbeVideoInfo.Fetch(Video video, CancellationToken cancellationToken, MediaInfo mediaInfo, BlurayDiscInfo blurayInfo, MetadataRefreshOptions options)
   at MediaBrowser.Providers.MediaInfo.FFProbeVideoInfo.ProbeVideo[T](T item, MetadataRefreshOptions options, CancellationToken cancellationToken)
   at MediaBrowser.Providers.Manager.MetadataService`2.RunCustomProvider(ICustomMetadataProvider`1 provider, TItemType item, String logName, MetadataRefreshOptions options, RefreshResult refreshResult, CancellationToken cancellationToken)
[2024-05-26 01:37:53.000 +00:00] [ERR] Error reporting playback progress
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 Emby.Server.Implementations.Data.SqliteExtensions.ExecuteQuery(SqliteCommand command)+MoveNext()
   at Emby.Server.Implementations.Data.SqliteItemRepository.GetItemList(InternalItemsQuery query)
   at Emby.Server.Implementations.Library.LibraryManager.GetItemList(InternalItemsQuery query, Boolean allowExternalContent)
   at Emby.Server.Implementations.Session.SessionManager.UpdateNowPlayingItem(SessionInfo session, PlaybackProgressInfo info, BaseItem libraryItem, Boolean updateLastCheckInTime)
   at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(PlaybackProgressInfo info, Boolean isAutomated)
   at MediaBrowser.Controller.Session.SessionInfo.OnProgressTimerCallback(Object state)
[2024-05-26 01:37:53.345 +00:00] [ERR] Error processing request. URL "POST" "/Sessions/Playing/Progress".
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.SqliteTransaction..ctor(SqliteConnection connection, IsolationLevel isolationLevel, Boolean deferred)
   at Emby.Server.Implementations.Data.SqliteUserDataRepository.PersistUserData(Int64 internalUserId, String key, UserItemData userData, CancellationToken cancellationToken)
   at Emby.Server.Implementations.Library.UserDataManager.SaveUserData(User user, BaseItem item, UserItemData userData, UserDataSaveReason reason, CancellationToken cancellationToken)
   at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(User user, BaseItem item, PlaybackProgressInfo info)
   at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(PlaybackProgressInfo info, Boolean isAutomated)
   at Jellyfin.Api.Controllers.PlaystateController.ReportPlaybackProgress(PlaybackProgressInfo playbackProgressInfo)
   at lambda_method369(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 Jellyfin.Api.Middleware.LanFilteringMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager, IServerConfigurationManager serverConfigurationManager)
   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)
[2024-05-26 01:37:54.997 +00:00] [ERR] Error reporting playback progress
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 Emby.Server.Implementations.Data.SqliteExtensions.ExecuteQuery(SqliteCommand command)+MoveNext()
   at Emby.Server.Implementations.Data.SqliteItemRepository.GetItemList(InternalItemsQuery query)
   at Emby.Server.Implementations.Library.LibraryManager.GetItemList(InternalItemsQuery query, Boolean allowExternalContent)
   at Emby.Server.Implementations.Session.SessionManager.UpdateNowPlayingItem(SessionInfo session, PlaybackProgressInfo info, BaseItem libraryItem, Boolean updateLastCheckInTime)
   at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(PlaybackProgressInfo info, Boolean isAutomated)
   at MediaBrowser.Controller.Session.SessionInfo.OnProgressTimerCallback(Object state)
[2024-05-26 01:37:55.867 +00:00] [ERR] Error reporting playback progress
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 Emby.Server.Implementations.Data.SqliteExtensions.ExecuteQuery(SqliteCommand command)+MoveNext()
   at Emby.Server.Implementations.Data.SqliteItemRepository.GetItemList(InternalItemsQuery query)
   at Emby.Server.Implementations.Library.LibraryManager.GetItemList(InternalItemsQuery query, Boolean allowExternalContent)
   at Emby.Server.Implementations.Session.SessionManager.UpdateNowPlayingItem(SessionInfo session, PlaybackProgressInfo info, BaseItem libraryItem, Boolean updateLastCheckInTime)
   at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(PlaybackProgressInfo info, Boolean isAutomated)
   at MediaBrowser.Controller.Session.SessionInfo.OnProgressTimerCallback(Object state)
[2024-05-26 01:37:57.972 +00:00] [ERR] Error reporting playback progress
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 Emby.Server.Implementations.Data.SqliteExtensions.ExecuteQuery(SqliteCommand command)+MoveNext()
   at Emby.Server.Implementations.Data.SqliteItemRepository.GetItemList(InternalItemsQuery query)
   at Emby.Server.Implementations.Library.LibraryManager.GetItemList(InternalItemsQuery query, Boolean allowExternalContent)
   at Emby.Server.Implementations.Session.SessionManager.UpdateNowPlayingItem(SessionInfo session, PlaybackProgressInfo info, BaseItem libraryItem, Boolean updateLastCheckInTime)
   at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(PlaybackProgressInfo info, Boolean isAutomated)
   at MediaBrowser.Controller.Session.SessionInfo.OnProgressTimerCallback(Object state)
[2024-05-26 01:38:02.976 +00:00] [ERR] Error reporting playback progress
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 Emby.Server.Implementations.Data.SqliteExtensions.ExecuteQuery(SqliteCommand command)+MoveNext()
   at Emby.Server.Implementations.Data.SqliteItemRepository.GetItemList(InternalItemsQuery query)
   at Emby.Server.Implementations.Library.LibraryManager.GetItemList(InternalItemsQuery query, Boolean allowExternalContent)
   at Emby.Server.Implementations.Session.SessionManager.UpdateNowPlayingItem(SessionInfo session, PlaybackProgressInfo info, BaseItem libraryItem, Boolean updateLastCheckInTime)
   at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(PlaybackProgressInfo info, Boolean isAutomated)
   at MediaBrowser.Controller.Session.SessionInfo.OnProgressTimerCallback(Object state)
[2024-05-26 01:38:03.035 +00:00] [INF] Processing playback tracker : "52327C2F-6B50-4EF6-AB33-9385C74920A7-e3aefde5f5064828b5b5b3ec7c86fae6-b1cf239c59b6d864c4a02841c3dcfaab"
[2024-05-26 01:38:05.987 +00:00] [ERR] Error reporting playback progress
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 Emby.Server.Implementations.Data.SqliteExtensions.ExecuteQuery(SqliteCommand command)+MoveNext()
   at Emby.Server.Implementations.Data.SqliteItemRepository.GetItemList(InternalItemsQuery query)
   at Emby.Server.Implementations.Library.LibraryManager.GetItemList(InternalItemsQuery query, Boolean allowExternalContent)
   at Emby.Server.Implementations.Session.SessionManager.UpdateNowPlayingItem(SessionInfo session, PlaybackProgressInfo info, BaseItem libraryItem, Boolean updateLastCheckInTime)
   at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(PlaybackProgressInfo info, Boolean isAutomated)
   at MediaBrowser.Controller.Session.SessionInfo.OnProgressTimerCallback(Object state)
[2024-05-26 01:38:06.419 +00:00] [INF] Library Sync: Updated 70 items
[2024-05-26 01:38:06.419 +00:00] [INF] Finished library sync, taking "00:00:39.4161513"
[2024-05-26 01:38:08.978 +00:00] [ERR] Error reporting playback progress
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 Emby.Server.Implementations.Data.SqliteExtensions.ExecuteQuery(SqliteCommand command)+MoveNext()
   at Emby.Server.Implementations.Data.SqliteItemRepository.GetItemList(InternalItemsQuery query)
   at Emby.Server.Implementations.Library.LibraryManager.GetItemList(InternalItemsQuery query, Boolean allowExternalContent)
   at Emby.Server.Implementations.Session.SessionManager.UpdateNowPlayingItem(SessionInfo session, PlaybackProgressInfo info, BaseItem libraryItem, Boolean updateLastCheckInTime)
   at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(PlaybackProgressInfo info, Boolean isAutomated)
   at MediaBrowser.Controller.Session.SessionInfo.OnProgressTimerCallback(Object state)
[2024-05-26 01:38:09.004 +00:00] [ERR] Error processing request. URL "POST" "/Sessions/Playing/Progress".
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.SqliteTransaction..ctor(SqliteConnection connection, IsolationLevel isolationLevel, Boolean deferred)
   at Emby.Server.Implementations.Data.SqliteUserDataRepository.PersistUserData(Int64 internalUserId, String key, UserItemData userData, CancellationToken cancellationToken)
   at Emby.Server.Implementations.Library.UserDataManager.SaveUserData(User user, BaseItem item, UserItemData userData, UserDataSaveReason reason, CancellationToken cancellationToken)
   at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(User user, BaseItem item, PlaybackProgressInfo info)
   at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(PlaybackProgressInfo info, Boolean isAutomated)
   at Jellyfin.Api.Controllers.PlaystateController.ReportPlaybackProgress(PlaybackProgressInfo playbackProgressInfo)
   at lambda_method369(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 Jellyfin.Api.Middleware.LanFilteringMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager, IServerConfigurationManager serverConfigurationManager)
   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)
[2024-05-26 01:38:10.505 +00:00] [ERR] Error reporting playback progress
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 Emby.Server.Implementations.Data.SqliteExtensions.ExecuteQuery(SqliteCommand command)+MoveNext()
   at Emby.Server.Implementations.Data.SqliteItemRepository.GetItemList(InternalItemsQuery query)
   at Emby.Server.Implementations.Library.LibraryManager.GetItemList(InternalItemsQuery query, Boolean allowExternalContent)
   at Emby.Server.Implementations.Session.SessionManager.UpdateNowPlayingItem(SessionInfo session, PlaybackProgressInfo info, BaseItem libraryItem, Boolean updateLastCheckInTime)
   at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(PlaybackProgressInfo info, Boolean isAutomated)
   at MediaBrowser.Controller.Session.SessionInfo.OnProgressTimerCallback(Object state)
[2024-05-26 01:38:19.990 +00:00] [ERR] Error reporting playback progress
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 Emby.Server.Implementations.Data.SqliteExtensions.ExecuteQuery(SqliteCommand command)+MoveNext()
   at Emby.Server.Implementations.Data.SqliteItemRepository.GetItemList(InternalItemsQuery query)
   at Emby.Server.Implementations.Library.LibraryManager.GetItemList(InternalItemsQuery query, Boolean allowExternalContent)
   at Emby.Server.Implementations.Session.SessionManager.UpdateNowPlayingItem(SessionInfo session, PlaybackProgressInfo info, BaseItem libraryItem, Boolean updateLastCheckInTime)
   at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(PlaybackProgressInfo info, Boolean isAutomated)
   at MediaBrowser.Controller.Session.SessionInfo.OnProgressTimerCallback(Object state)
[2024-05-26 01:38:23.686 +00:00] [INF] Processing playback tracker : "52327C2F-6B50-4EF6-AB33-9385C74920A7-e3aefde5f5064828b5b5b3ec7c86fae6-b1cf239c59b6d864c4a02841c3dcfaab"
[2024-05-26 01:38:36.670 +00:00] [INF] Removing virtual season null in series "Blinded by the Lights"
[2024-05-26 01:38:36.670 +00:00] [INF] Removing item, Type: "Season", Name: "Staffel unbekannt", Path: "", Id: 1d105609-6a55-34a5-1bf8-d570140786fa
[2024-05-26 01:38:36.686 +00:00] [ERR] Error executing Scheduled Task
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 Emby.Server.Implementations.Data.SqliteExtensions.ExecuteQuery(SqliteCommand command)+MoveNext()
   at Emby.Server.Implementations.Data.SqliteItemRepository.GetItemList(InternalItemsQuery query)
   at MediaBrowser.Controller.Entities.Folder.RefreshChildMetadata(BaseItem child, MetadataRefreshOptions refreshOptions, Boolean recursive, IProgress`1 progress, CancellationToken cancellationToken)
   at MediaBrowser.Controller.Entities.Folder.<>c__DisplayClass69_0`1.<<RunTasks>b__1>d.MoveNext()
--- End of stack trace from previous location ---
   at MediaBrowser.Controller.Entities.Folder.RunTasks[T](Func`3 task, IList`1 children, IProgress`1 progress, CancellationToken cancellationToken)
   at MediaBrowser.Controller.Entities.Folder.RefreshChildMetadata(BaseItem child, MetadataRefreshOptions refreshOptions, Boolean recursive, IProgress`1 progress, CancellationToken cancellationToken)
   at MediaBrowser.Controller.Entities.Folder.<>c__DisplayClass69_0`1.<<RunTasks>b__1>d.MoveNext()
--- End of stack trace from previous location ---
   at MediaBrowser.Controller.Entities.Folder.RunTasks[T](Func`3 task, IList`1 children, IProgress`1 progress, CancellationToken cancellationToken)
   at MediaBrowser.Controller.Entities.Folder.ValidateChildrenInternal2(IProgress`1 progress, Boolean recursive, Boolean refreshChildMetadata, Boolean allowRemoveRoot, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService, CancellationToken cancellationToken)
   at MediaBrowser.Controller.Entities.Folder.ValidateChildrenInternal(IProgress`1 progress, Boolean recursive, Boolean refreshChildMetadata, Boolean allowRemoveRoot, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService, CancellationToken cancellationToken)
   at MediaBrowser.Controller.Entities.AggregateFolder.ValidateChildrenInternal(IProgress`1 progress, Boolean recursive, Boolean refreshChildMetadata, Boolean allowRemoveRoot, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService, CancellationToken cancellationToken)
   at Emby.Server.Implementations.Library.LibraryManager.PerformLibraryValidation(IProgress`1 progress, CancellationToken cancellationToken)
   at Emby.Server.Implementations.Library.LibraryManager.ValidateMediaLibraryInternal(IProgress`1 progress, CancellationToken cancellationToken)
   at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options)
[2024-05-26 01:38:36.687 +00:00] [INF] "Scanne Medien-Bibliothek" Failed after 38 minute(s) and 36 seconds

FFmpeg logs

No response

Please attach any browser or client logs here

No response

Please attach any screenshots here

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
Originally created by @derterboy on GitHub (May 26, 2024). ### Please describe your bug Media Scan aborting with an error after ~37 minutes. Its only movies and tvshows libraries (really large ones). ### Reproduction Steps 1. Starting a Media Scan on a large Media collection ### Jellyfin Version 10.9.0 ### if other: 10.9.2 ### Environment ```markdown - OS: Ubuntu 22 - Linux Kernel: 6.5.0-35-generic x86_64 - Storage: Fuse Mount ``` ### Jellyfin logs ```shell [2024-05-26 01:37:52.134 +00:00] [ERR] Error in "Probe Provider" 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.SqliteTransaction..ctor(SqliteConnection connection, IsolationLevel isolationLevel, Boolean deferred) at Emby.Server.Implementations.Data.SqliteItemRepository.SaveMediaStreams(Guid id, IReadOnlyList`1 streams, CancellationToken cancellationToken) at MediaBrowser.Providers.MediaInfo.FFProbeVideoInfo.Fetch(Video video, CancellationToken cancellationToken, MediaInfo mediaInfo, BlurayDiscInfo blurayInfo, MetadataRefreshOptions options) at MediaBrowser.Providers.MediaInfo.FFProbeVideoInfo.ProbeVideo[T](T item, MetadataRefreshOptions options, CancellationToken cancellationToken) at MediaBrowser.Providers.Manager.MetadataService`2.RunCustomProvider(ICustomMetadataProvider`1 provider, TItemType item, String logName, MetadataRefreshOptions options, RefreshResult refreshResult, CancellationToken cancellationToken) [2024-05-26 01:37:53.000 +00:00] [ERR] Error reporting playback progress 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 Emby.Server.Implementations.Data.SqliteExtensions.ExecuteQuery(SqliteCommand command)+MoveNext() at Emby.Server.Implementations.Data.SqliteItemRepository.GetItemList(InternalItemsQuery query) at Emby.Server.Implementations.Library.LibraryManager.GetItemList(InternalItemsQuery query, Boolean allowExternalContent) at Emby.Server.Implementations.Session.SessionManager.UpdateNowPlayingItem(SessionInfo session, PlaybackProgressInfo info, BaseItem libraryItem, Boolean updateLastCheckInTime) at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(PlaybackProgressInfo info, Boolean isAutomated) at MediaBrowser.Controller.Session.SessionInfo.OnProgressTimerCallback(Object state) [2024-05-26 01:37:53.345 +00:00] [ERR] Error processing request. URL "POST" "/Sessions/Playing/Progress". 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.SqliteTransaction..ctor(SqliteConnection connection, IsolationLevel isolationLevel, Boolean deferred) at Emby.Server.Implementations.Data.SqliteUserDataRepository.PersistUserData(Int64 internalUserId, String key, UserItemData userData, CancellationToken cancellationToken) at Emby.Server.Implementations.Library.UserDataManager.SaveUserData(User user, BaseItem item, UserItemData userData, UserDataSaveReason reason, CancellationToken cancellationToken) at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(User user, BaseItem item, PlaybackProgressInfo info) at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(PlaybackProgressInfo info, Boolean isAutomated) at Jellyfin.Api.Controllers.PlaystateController.ReportPlaybackProgress(PlaybackProgressInfo playbackProgressInfo) at lambda_method369(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 Jellyfin.Api.Middleware.LanFilteringMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager, IServerConfigurationManager serverConfigurationManager) 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) [2024-05-26 01:37:54.997 +00:00] [ERR] Error reporting playback progress 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 Emby.Server.Implementations.Data.SqliteExtensions.ExecuteQuery(SqliteCommand command)+MoveNext() at Emby.Server.Implementations.Data.SqliteItemRepository.GetItemList(InternalItemsQuery query) at Emby.Server.Implementations.Library.LibraryManager.GetItemList(InternalItemsQuery query, Boolean allowExternalContent) at Emby.Server.Implementations.Session.SessionManager.UpdateNowPlayingItem(SessionInfo session, PlaybackProgressInfo info, BaseItem libraryItem, Boolean updateLastCheckInTime) at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(PlaybackProgressInfo info, Boolean isAutomated) at MediaBrowser.Controller.Session.SessionInfo.OnProgressTimerCallback(Object state) [2024-05-26 01:37:55.867 +00:00] [ERR] Error reporting playback progress 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 Emby.Server.Implementations.Data.SqliteExtensions.ExecuteQuery(SqliteCommand command)+MoveNext() at Emby.Server.Implementations.Data.SqliteItemRepository.GetItemList(InternalItemsQuery query) at Emby.Server.Implementations.Library.LibraryManager.GetItemList(InternalItemsQuery query, Boolean allowExternalContent) at Emby.Server.Implementations.Session.SessionManager.UpdateNowPlayingItem(SessionInfo session, PlaybackProgressInfo info, BaseItem libraryItem, Boolean updateLastCheckInTime) at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(PlaybackProgressInfo info, Boolean isAutomated) at MediaBrowser.Controller.Session.SessionInfo.OnProgressTimerCallback(Object state) [2024-05-26 01:37:57.972 +00:00] [ERR] Error reporting playback progress 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 Emby.Server.Implementations.Data.SqliteExtensions.ExecuteQuery(SqliteCommand command)+MoveNext() at Emby.Server.Implementations.Data.SqliteItemRepository.GetItemList(InternalItemsQuery query) at Emby.Server.Implementations.Library.LibraryManager.GetItemList(InternalItemsQuery query, Boolean allowExternalContent) at Emby.Server.Implementations.Session.SessionManager.UpdateNowPlayingItem(SessionInfo session, PlaybackProgressInfo info, BaseItem libraryItem, Boolean updateLastCheckInTime) at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(PlaybackProgressInfo info, Boolean isAutomated) at MediaBrowser.Controller.Session.SessionInfo.OnProgressTimerCallback(Object state) [2024-05-26 01:38:02.976 +00:00] [ERR] Error reporting playback progress 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 Emby.Server.Implementations.Data.SqliteExtensions.ExecuteQuery(SqliteCommand command)+MoveNext() at Emby.Server.Implementations.Data.SqliteItemRepository.GetItemList(InternalItemsQuery query) at Emby.Server.Implementations.Library.LibraryManager.GetItemList(InternalItemsQuery query, Boolean allowExternalContent) at Emby.Server.Implementations.Session.SessionManager.UpdateNowPlayingItem(SessionInfo session, PlaybackProgressInfo info, BaseItem libraryItem, Boolean updateLastCheckInTime) at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(PlaybackProgressInfo info, Boolean isAutomated) at MediaBrowser.Controller.Session.SessionInfo.OnProgressTimerCallback(Object state) [2024-05-26 01:38:03.035 +00:00] [INF] Processing playback tracker : "52327C2F-6B50-4EF6-AB33-9385C74920A7-e3aefde5f5064828b5b5b3ec7c86fae6-b1cf239c59b6d864c4a02841c3dcfaab" [2024-05-26 01:38:05.987 +00:00] [ERR] Error reporting playback progress 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 Emby.Server.Implementations.Data.SqliteExtensions.ExecuteQuery(SqliteCommand command)+MoveNext() at Emby.Server.Implementations.Data.SqliteItemRepository.GetItemList(InternalItemsQuery query) at Emby.Server.Implementations.Library.LibraryManager.GetItemList(InternalItemsQuery query, Boolean allowExternalContent) at Emby.Server.Implementations.Session.SessionManager.UpdateNowPlayingItem(SessionInfo session, PlaybackProgressInfo info, BaseItem libraryItem, Boolean updateLastCheckInTime) at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(PlaybackProgressInfo info, Boolean isAutomated) at MediaBrowser.Controller.Session.SessionInfo.OnProgressTimerCallback(Object state) [2024-05-26 01:38:06.419 +00:00] [INF] Library Sync: Updated 70 items [2024-05-26 01:38:06.419 +00:00] [INF] Finished library sync, taking "00:00:39.4161513" [2024-05-26 01:38:08.978 +00:00] [ERR] Error reporting playback progress 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 Emby.Server.Implementations.Data.SqliteExtensions.ExecuteQuery(SqliteCommand command)+MoveNext() at Emby.Server.Implementations.Data.SqliteItemRepository.GetItemList(InternalItemsQuery query) at Emby.Server.Implementations.Library.LibraryManager.GetItemList(InternalItemsQuery query, Boolean allowExternalContent) at Emby.Server.Implementations.Session.SessionManager.UpdateNowPlayingItem(SessionInfo session, PlaybackProgressInfo info, BaseItem libraryItem, Boolean updateLastCheckInTime) at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(PlaybackProgressInfo info, Boolean isAutomated) at MediaBrowser.Controller.Session.SessionInfo.OnProgressTimerCallback(Object state) [2024-05-26 01:38:09.004 +00:00] [ERR] Error processing request. URL "POST" "/Sessions/Playing/Progress". 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.SqliteTransaction..ctor(SqliteConnection connection, IsolationLevel isolationLevel, Boolean deferred) at Emby.Server.Implementations.Data.SqliteUserDataRepository.PersistUserData(Int64 internalUserId, String key, UserItemData userData, CancellationToken cancellationToken) at Emby.Server.Implementations.Library.UserDataManager.SaveUserData(User user, BaseItem item, UserItemData userData, UserDataSaveReason reason, CancellationToken cancellationToken) at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(User user, BaseItem item, PlaybackProgressInfo info) at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(PlaybackProgressInfo info, Boolean isAutomated) at Jellyfin.Api.Controllers.PlaystateController.ReportPlaybackProgress(PlaybackProgressInfo playbackProgressInfo) at lambda_method369(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 Jellyfin.Api.Middleware.LanFilteringMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager, IServerConfigurationManager serverConfigurationManager) 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) [2024-05-26 01:38:10.505 +00:00] [ERR] Error reporting playback progress 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 Emby.Server.Implementations.Data.SqliteExtensions.ExecuteQuery(SqliteCommand command)+MoveNext() at Emby.Server.Implementations.Data.SqliteItemRepository.GetItemList(InternalItemsQuery query) at Emby.Server.Implementations.Library.LibraryManager.GetItemList(InternalItemsQuery query, Boolean allowExternalContent) at Emby.Server.Implementations.Session.SessionManager.UpdateNowPlayingItem(SessionInfo session, PlaybackProgressInfo info, BaseItem libraryItem, Boolean updateLastCheckInTime) at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(PlaybackProgressInfo info, Boolean isAutomated) at MediaBrowser.Controller.Session.SessionInfo.OnProgressTimerCallback(Object state) [2024-05-26 01:38:19.990 +00:00] [ERR] Error reporting playback progress 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 Emby.Server.Implementations.Data.SqliteExtensions.ExecuteQuery(SqliteCommand command)+MoveNext() at Emby.Server.Implementations.Data.SqliteItemRepository.GetItemList(InternalItemsQuery query) at Emby.Server.Implementations.Library.LibraryManager.GetItemList(InternalItemsQuery query, Boolean allowExternalContent) at Emby.Server.Implementations.Session.SessionManager.UpdateNowPlayingItem(SessionInfo session, PlaybackProgressInfo info, BaseItem libraryItem, Boolean updateLastCheckInTime) at Emby.Server.Implementations.Session.SessionManager.OnPlaybackProgress(PlaybackProgressInfo info, Boolean isAutomated) at MediaBrowser.Controller.Session.SessionInfo.OnProgressTimerCallback(Object state) [2024-05-26 01:38:23.686 +00:00] [INF] Processing playback tracker : "52327C2F-6B50-4EF6-AB33-9385C74920A7-e3aefde5f5064828b5b5b3ec7c86fae6-b1cf239c59b6d864c4a02841c3dcfaab" [2024-05-26 01:38:36.670 +00:00] [INF] Removing virtual season null in series "Blinded by the Lights" [2024-05-26 01:38:36.670 +00:00] [INF] Removing item, Type: "Season", Name: "Staffel unbekannt", Path: "", Id: 1d105609-6a55-34a5-1bf8-d570140786fa [2024-05-26 01:38:36.686 +00:00] [ERR] Error executing Scheduled Task 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 Emby.Server.Implementations.Data.SqliteExtensions.ExecuteQuery(SqliteCommand command)+MoveNext() at Emby.Server.Implementations.Data.SqliteItemRepository.GetItemList(InternalItemsQuery query) at MediaBrowser.Controller.Entities.Folder.RefreshChildMetadata(BaseItem child, MetadataRefreshOptions refreshOptions, Boolean recursive, IProgress`1 progress, CancellationToken cancellationToken) at MediaBrowser.Controller.Entities.Folder.<>c__DisplayClass69_0`1.<<RunTasks>b__1>d.MoveNext() --- End of stack trace from previous location --- at MediaBrowser.Controller.Entities.Folder.RunTasks[T](Func`3 task, IList`1 children, IProgress`1 progress, CancellationToken cancellationToken) at MediaBrowser.Controller.Entities.Folder.RefreshChildMetadata(BaseItem child, MetadataRefreshOptions refreshOptions, Boolean recursive, IProgress`1 progress, CancellationToken cancellationToken) at MediaBrowser.Controller.Entities.Folder.<>c__DisplayClass69_0`1.<<RunTasks>b__1>d.MoveNext() --- End of stack trace from previous location --- at MediaBrowser.Controller.Entities.Folder.RunTasks[T](Func`3 task, IList`1 children, IProgress`1 progress, CancellationToken cancellationToken) at MediaBrowser.Controller.Entities.Folder.ValidateChildrenInternal2(IProgress`1 progress, Boolean recursive, Boolean refreshChildMetadata, Boolean allowRemoveRoot, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService, CancellationToken cancellationToken) at MediaBrowser.Controller.Entities.Folder.ValidateChildrenInternal(IProgress`1 progress, Boolean recursive, Boolean refreshChildMetadata, Boolean allowRemoveRoot, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService, CancellationToken cancellationToken) at MediaBrowser.Controller.Entities.AggregateFolder.ValidateChildrenInternal(IProgress`1 progress, Boolean recursive, Boolean refreshChildMetadata, Boolean allowRemoveRoot, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService, CancellationToken cancellationToken) at Emby.Server.Implementations.Library.LibraryManager.PerformLibraryValidation(IProgress`1 progress, CancellationToken cancellationToken) at Emby.Server.Implementations.Library.LibraryManager.ValidateMediaLibraryInternal(IProgress`1 progress, CancellationToken cancellationToken) at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options) [2024-05-26 01:38:36.687 +00:00] [INF] "Scanne Medien-Bibliothek" Failed after 38 minute(s) and 36 seconds ``` ### FFmpeg logs _No response_ ### Please attach any browser or client logs here _No response_ ### Please attach any screenshots here _No response_ ### Code of Conduct - [X] I agree to follow this project's Code of Conduct
OVERLORD added the bug label 2026-02-07 02:28:17 +03:00
Author
Owner

@jellyfin-bot commented on GitHub (May 26, 2024):

Hi, it seems like your issue report has the following item(s) that need to be addressed:

  • The format of the environment section has been altered from the template.

This is an automated message, currently under testing. Please file an issue here if you encounter any problems.

@jellyfin-bot commented on GitHub (May 26, 2024): Hi, it seems like your issue report has the following item(s) that need to be addressed: - The format of the environment section has been altered from the template. This is an automated message, currently under testing. Please file an issue [here](https://github.com/jellyfin/jellyfin-triage-scripts/issues) if you encounter any problems.
Author
Owner

@johnseekins commented on GitHub (May 26, 2024):

A short term workaround:
Set Performance -> Parallel library scan tasks limit to 1. This massively slows down scanning, but I am no longer getting similar table lock issues with this setting.

@johnseekins commented on GitHub (May 26, 2024): A short term workaround: Set `Performance` -> `Parallel library scan tasks limit` to 1. This _massively_ slows down scanning, but I am no longer getting similar table lock issues with this setting.
Author
Owner

@derterboy commented on GitHub (May 27, 2024):

The error also occurs with Parallel library scan tasks limit set to 1.

@derterboy commented on GitHub (May 27, 2024): The error also occurs with Parallel library scan tasks limit set to 1.
Author
Owner

@nothing2obvi commented on GitHub (May 27, 2024):

I am having the same issue on 10.9.3, using Jellyfin lsio image via Docker.

The workaround suggested by @johnseekins does not work for me.

@nothing2obvi commented on GitHub (May 27, 2024): I am having the same issue on 10.9.3, using Jellyfin lsio image via Docker. The workaround suggested by @johnseekins does not work for me.
Author
Owner

@krutburken commented on GitHub (May 27, 2024):

A short term workaround: Set Performance -> Parallel library scan tasks limit to 1. This massively slows down scanning, but I am no longer getting similar table lock issues with this setting.

This worked for me. As stated though, library scans are really slow as a result

@krutburken commented on GitHub (May 27, 2024): > A short term workaround: Set `Performance` -> `Parallel library scan tasks limit` to 1. This _massively_ slows down scanning, but I am no longer getting similar table lock issues with this setting. This worked for me. As stated though, library scans are really slow as a result
Author
Owner

@nikolajsheller commented on GitHub (May 30, 2024):

A short term workaround: Set Performance -> Parallel library scan tasks limit to 1. This massively slows down scanning, but I am no longer getting similar table lock issues with this setting.

This worked for me. As stated though, library scans are really slow as a result

I am seeing this too. Slow but successful scans.
Seems like a concurrency issue when running multiple scan threads.

@nikolajsheller commented on GitHub (May 30, 2024): > > A short term workaround: Set `Performance` -> `Parallel library scan tasks limit` to 1. This _massively_ slows down scanning, but I am no longer getting similar table lock issues with this setting. > > This worked for me. As stated though, library scans are really slow as a result I am seeing this too. Slow but successful scans. Seems like a concurrency issue when running multiple scan threads.
Author
Owner

@derterboy commented on GitHub (Jun 2, 2024):

A short term workaround: Set Performance -> Parallel library scan tasks limit to 1. This massively slows down scanning, but I am no longer getting similar table lock issues with this setting.

This worked for me. As stated though, library scans are really slow as a result

I am seeing this too. Slow but successful scans. Seems like a concurrency issue when running multiple scan threads.

Not really as it also gets locked with limiting it to 1.

@derterboy commented on GitHub (Jun 2, 2024): > > > A short term workaround: Set `Performance` -> `Parallel library scan tasks limit` to 1. This _massively_ slows down scanning, but I am no longer getting similar table lock issues with this setting. > > > > > > This worked for me. As stated though, library scans are really slow as a result > > I am seeing this too. Slow but successful scans. Seems like a concurrency issue when running multiple scan threads. Not really as it also gets locked with limiting it to 1.
Author
Owner

@nodje commented on GitHub (Jun 2, 2024):

Same issue here with 10.9.3

@nodje commented on GitHub (Jun 2, 2024): Same issue here with 10.9.3
Author
Owner

@derterboy commented on GitHub (Jun 3, 2024):

Just to update: Same issue with 10.9.4:

[2024-06-03 09:36:53.371 +00:00] [ERR] Error executing Scheduled Task 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.SqliteTransaction..ctor(SqliteConnection connection, IsolationLevel isolationLevel, Boolean deferred) at Emby.Server.Implementations.Data.SqliteItemRepository.UpdatePeople(Guid itemId, List1 people)
at Emby.Server.Implementations.Library.LibraryManager.UpdatePeopleAsync(BaseItem item, List1 people, CancellationToken cancellationToken) at MediaBrowser.Providers.Manager.MetadataService2.SaveItemAsync(MetadataResult1 result, ItemUpdateType reason, CancellationToken cancellationToken) at MediaBrowser.Providers.Manager.MetadataService2.RefreshMetadata(BaseItem item, MetadataRefreshOptions refreshOptions, CancellationToken cancellationToken)
at MediaBrowser.Controller.Entities.BaseItem.RefreshMetadata(MetadataRefreshOptions options, CancellationToken cancellationToken)
at MediaBrowser.Controller.Entities.TV.Series.RefreshAllMetadata(MetadataRefreshOptions refreshOptions, IProgress1 progress, CancellationToken cancellationToken) at MediaBrowser.Controller.Entities.Folder.RefreshAllMetadataForContainer(IMetadataContainer container, MetadataRefreshOptions refreshOptions, IProgress1 progress, CancellationToken cancellationToken)
at MediaBrowser.Controller.Entities.Folder.RefreshChildMetadata(BaseItem child, MetadataRefreshOptions refreshOptions, Boolean recursive, IProgress1 progress, CancellationToken cancellationToken) at MediaBrowser.Controller.Entities.Folder.<>c__DisplayClass69_01.<b__1>d.MoveNext()
--- End of stack trace from previous location ---
at MediaBrowser.Controller.Entities.Folder.RunTasks[T](Func3 task, IList1 children, IProgress1 progress, CancellationToken cancellationToken) at MediaBrowser.Controller.Entities.Folder.RefreshChildMetadata(BaseItem child, MetadataRefreshOptions refreshOptions, Boolean recursive, IProgress1 progress, CancellationToken cancellationToken)
at MediaBrowser.Controller.Entities.Folder.<>c__DisplayClass69_01.<<RunTasks>b__1>d.MoveNext() --- End of stack trace from previous location --- at MediaBrowser.Controller.Entities.Folder.RunTasks[T](Func3 task, IList1 children, IProgress1 progress, CancellationToken cancellationToken)
at MediaBrowser.Controller.Entities.Folder.ValidateChildrenInternal2(IProgress1 progress, Boolean recursive, Boolean refreshChildMetadata, Boolean allowRemoveRoot, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService, CancellationToken cancellationToken) at MediaBrowser.Controller.Entities.Folder.ValidateChildrenInternal(IProgress1 progress, Boolean recursive, Boolean refreshChildMetadata, Boolean allowRemoveRoot, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService, CancellationToken cancellationToken)
at MediaBrowser.Controller.Entities.AggregateFolder.ValidateChildrenInternal(IProgress1 progress, Boolean recursive, Boolean refreshChildMetadata, Boolean allowRemoveRoot, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService, CancellationToken cancellationToken) at Emby.Server.Implementations.Library.LibraryManager.PerformLibraryValidation(IProgress1 progress, CancellationToken cancellationToken)
at Emby.Server.Implementations.Library.LibraryManager.ValidateMediaLibraryInternal(IProgress1 progress, CancellationToken cancellationToken) at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options) [2024-06-03 09:36:53.380 +00:00] [INF] "Scanne Medien-Bibliothek" Failed after 36 minute(s) and 53 seconds

@derterboy commented on GitHub (Jun 3, 2024): Just to update: Same issue with 10.9.4: `[2024-06-03 09:36:53.371 +00:00] [ERR] Error executing Scheduled Task 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.SqliteTransaction..ctor(SqliteConnection connection, IsolationLevel isolationLevel, Boolean deferred) at Emby.Server.Implementations.Data.SqliteItemRepository.UpdatePeople(Guid itemId, List`1 people) at Emby.Server.Implementations.Library.LibraryManager.UpdatePeopleAsync(BaseItem item, List`1 people, CancellationToken cancellationToken) at MediaBrowser.Providers.Manager.MetadataService`2.SaveItemAsync(MetadataResult`1 result, ItemUpdateType reason, 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.TV.Series.RefreshAllMetadata(MetadataRefreshOptions refreshOptions, IProgress`1 progress, CancellationToken cancellationToken) at MediaBrowser.Controller.Entities.Folder.RefreshAllMetadataForContainer(IMetadataContainer container, MetadataRefreshOptions refreshOptions, IProgress`1 progress, CancellationToken cancellationToken) at MediaBrowser.Controller.Entities.Folder.RefreshChildMetadata(BaseItem child, MetadataRefreshOptions refreshOptions, Boolean recursive, IProgress`1 progress, CancellationToken cancellationToken) at MediaBrowser.Controller.Entities.Folder.<>c__DisplayClass69_0`1.<<RunTasks>b__1>d.MoveNext() --- End of stack trace from previous location --- at MediaBrowser.Controller.Entities.Folder.RunTasks[T](Func`3 task, IList`1 children, IProgress`1 progress, CancellationToken cancellationToken) at MediaBrowser.Controller.Entities.Folder.RefreshChildMetadata(BaseItem child, MetadataRefreshOptions refreshOptions, Boolean recursive, IProgress`1 progress, CancellationToken cancellationToken) at MediaBrowser.Controller.Entities.Folder.<>c__DisplayClass69_0`1.<<RunTasks>b__1>d.MoveNext() --- End of stack trace from previous location --- at MediaBrowser.Controller.Entities.Folder.RunTasks[T](Func`3 task, IList`1 children, IProgress`1 progress, CancellationToken cancellationToken) at MediaBrowser.Controller.Entities.Folder.ValidateChildrenInternal2(IProgress`1 progress, Boolean recursive, Boolean refreshChildMetadata, Boolean allowRemoveRoot, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService, CancellationToken cancellationToken) at MediaBrowser.Controller.Entities.Folder.ValidateChildrenInternal(IProgress`1 progress, Boolean recursive, Boolean refreshChildMetadata, Boolean allowRemoveRoot, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService, CancellationToken cancellationToken) at MediaBrowser.Controller.Entities.AggregateFolder.ValidateChildrenInternal(IProgress`1 progress, Boolean recursive, Boolean refreshChildMetadata, Boolean allowRemoveRoot, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService, CancellationToken cancellationToken) at Emby.Server.Implementations.Library.LibraryManager.PerformLibraryValidation(IProgress`1 progress, CancellationToken cancellationToken) at Emby.Server.Implementations.Library.LibraryManager.ValidateMediaLibraryInternal(IProgress`1 progress, CancellationToken cancellationToken) at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options) [2024-06-03 09:36:53.380 +00:00] [INF] "Scanne Medien-Bibliothek" Failed after 36 minute(s) and 53 seconds`
Author
Owner

@JamsRepos commented on GitHub (Jun 3, 2024):

Unfortunately I've just witnessed the same thing on 10.9.4. I have changed the parellel value and will report back if I notice it again if the server locks up.

@JamsRepos commented on GitHub (Jun 3, 2024): Unfortunately I've just witnessed the same thing on 10.9.4. I have changed the parellel value and will report back if I notice it again if the server locks up.
Author
Owner

@DwayneGit commented on GitHub (Jun 6, 2024):

I'm sure this is a bug at this point. I didn't have this problem at all until I updated a couple days ago because a message, I got on the amazon tv app saying I had to. Now it locks up after every 3 episodes or if I end an episode early or any reason really.

@DwayneGit commented on GitHub (Jun 6, 2024): I'm sure this is a bug at this point. I didn't have this problem at all until I updated a couple days ago because a message, I got on the amazon tv app saying I had to. Now it locks up after every 3 episodes or if I end an episode early or any reason really.
Author
Owner

@JamsRepos commented on GitHub (Jun 10, 2024):

I've not personally had this issue since I removed the Kodi plugin. I would try and remove it, if you have it.

@JamsRepos commented on GitHub (Jun 10, 2024): I've not personally had this issue since I removed the Kodi plugin. I would try and remove it, if you have it.
Author
Owner

@johnseekins-pathccm commented on GitHub (Jun 10, 2024):

I've no longer been seeing this problem since upgrading to 10.9.6. (I believe this PR may have worked some wonders: https://github.com/jellyfin/jellyfin/pull/11986). I've even changed my "single processing thread" mentioned above back to the default setting and am not seeing errors.

@johnseekins-pathccm commented on GitHub (Jun 10, 2024): I've no longer been seeing this problem since upgrading to 10.9.6. (I believe this PR may have worked some wonders: https://github.com/jellyfin/jellyfin/pull/11986). I've even changed my "single processing thread" mentioned above back to the default setting and am not seeing errors.
Author
Owner

@derterboy commented on GitHub (Jun 11, 2024):

I can confirm that this seems to be fixed with 10.9.6

@derterboy commented on GitHub (Jun 11, 2024): I can confirm that this seems to be fixed with 10.9.6
Author
Owner

@holow29 commented on GitHub (Aug 24, 2024):

Seems like dupe of #11589

@holow29 commented on GitHub (Aug 24, 2024): Seems like dupe of #11589
Author
Owner

@felix920506 commented on GitHub (Aug 25, 2024):

Duplicate of #11589

@felix920506 commented on GitHub (Aug 25, 2024): Duplicate of #11589
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#5863