mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-04 18:09:12 +03:00
[Issue]: Error during Media Scan: SQLite Error 6: 'database table is locked'. JellyFin 10.9.2 #5863
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
Jellyfin Version
10.9.0
if other:
10.9.2
Environment
Jellyfin logs
FFmpeg logs
No response
Please attach any browser or client logs here
No response
Please attach any screenshots here
No response
Code of Conduct
@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:
This is an automated message, currently under testing. Please file an issue here if you encounter any problems.
@johnseekins commented on GitHub (May 26, 2024):
A short term workaround:
Set
Performance->Parallel library scan tasks limitto 1. This massively slows down scanning, but I am no longer getting similar table lock issues with this setting.@derterboy commented on GitHub (May 27, 2024):
The error also occurs with Parallel library scan tasks limit set to 1.
@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.
@krutburken commented on GitHub (May 27, 2024):
This worked for me. As stated though, library scans are really slow as a result
@nikolajsheller commented on GitHub (May 30, 2024):
I am seeing this too. Slow but successful scans.
Seems like a concurrency issue when running multiple scan threads.
@derterboy commented on GitHub (Jun 2, 2024):
Not really as it also gets locked with limiting it to 1.
@nodje commented on GitHub (Jun 2, 2024):
Same issue here with 10.9.3
@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, List
1 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, IProgress
1 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, IProgress
1 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](Func
3 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_0
1.<<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(IProgress
1 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(IProgress
1 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(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@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.
@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.
@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.
@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.
@derterboy commented on GitHub (Jun 11, 2024):
I can confirm that this seems to be fixed with 10.9.6
@holow29 commented on GitHub (Aug 24, 2024):
Seems like dupe of #11589
@felix920506 commented on GitHub (Aug 25, 2024):
Duplicate of #11589