Closed prahal closed 4 months ago
Same here. Running Jellyfin in a lsio container on unRAID. After updating to 10.9.0 this exact same exception. Updating to 10.9.1 - did not help - same exception.
[2024-05-12 21:27:20.889 -04:00] [INF] [179] Emby.Server.Implementations.ScheduledTasks.TaskManager: "Scan Media Library" Completed after 2 minute(s) and 19 seconds
[2024-05-12 21:27:30.100 -04:00] [ERR] [41] Jellyfin.Plugin.KodiSyncQueue.EntryPoints.LibrarySyncNotification: An error has occurred in LibraryUpdateTimerCallback
LiteDB.LiteException: Maximum number of transactions reached
at LiteDB.Engine.TransactionMonitor.GetTransaction(Boolean create, Boolean queryOnly, Boolean& isNew)
at LiteDB.Engine.QueryExecutor.ExecuteQuery(Boolean executionPlan)
at LiteDB.Engine.LiteEngine.Query(String collection, Query query)
at LiteDB.LiteQueryable`1.ToDocuments()+MoveNext()
at System.Linq.Enumerable.SelectEnumerableIterator`2.MoveNext()
at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable`1 source, Boolean& found)
at Jellyfin.Plugin.KodiSyncQueue.Data.DbRepo.WriteLibrarySync(IEnumerable`1 items, ItemStatus status)
at Jellyfin.Plugin.KodiSyncQueue.EntryPoints.LibrarySyncNotification.UpdateLibrary(IReadOnlyCollection`1 items, ItemStatus status)
at Jellyfin.Plugin.KodiSyncQueue.EntryPoints.LibrarySyncNotification.PushChangesToDb(IReadOnlyCollection`1 itemsAdded, IReadOnlyCollection`1 itemsUpdated, IReadOnlyCollection`1 itemsRemoved)
at Jellyfin.Plugin.KodiSyncQueue.EntryPoints.LibrarySyncNotification.LibraryUpdateTimerCallback(Object state)
Also getting this after upgrading 10.9.1, error in LibraryUpdateTimerCallback, maybe related ? Running in docker on debian
[2024-05-14 09:53:56.946 +02:00] [ERR] [89] Jellyfin.Plugin.KodiSyncQueue.EntryPoints.LibrarySyncNotification: An error has occurred in LibraryUpdateTimerCallback
System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'System.Threading.ReaderWriterLockSlim'.
at System.Threading.ReaderWriterLockSlim.TryEnterReadLockCore(TimeoutTracker timeout)
at LiteDB.Engine.LockService.EnterTransaction()
at LiteDB.Engine.TransactionMonitor.GetTransaction(Boolean create, Boolean queryOnly, Boolean& isNew)
at LiteDB.Engine.QueryExecutor.ExecuteQuery(Boolean executionPlan)
at LiteDB.Engine.LiteEngine.Query(String collection, Query query)
at LiteDB.LiteQueryable`1.ToDocuments()+MoveNext()
at System.Linq.Enumerable.SelectEnumerableIterator`2.MoveNext()
at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable`1 source, Boolean& found)
at Jellyfin.Plugin.KodiSyncQueue.Data.DbRepo.WriteLibrarySync(IEnumerable`1 items, ItemStatus status)
at Jellyfin.Plugin.KodiSyncQueue.EntryPoints.LibrarySyncNotification.UpdateLibrary(IReadOnlyCollection`1 items, ItemStatus status)
at Jellyfin.Plugin.KodiSyncQueue.EntryPoints.LibrarySyncNotification.PushChangesToDb(IReadOnlyCollection`1 itemsAdded, IReadOnlyCollection`1 itemsUpdated, IReadOnlyCollection`1 itemsRemoved)
at Jellyfin.Plugin.KodiSyncQueue.EntryPoints.LibrarySyncNotification.LibraryUpdateTimerCallback(Object state)
Also "UserUpdateTimerCallback"
[2024-05-14 09:53:31.905 +02:00] [INF] [98] Jellyfin.Plugin.KodiSyncQueue.EntryPoints.UserSyncNotification: Started user data sync
[2024-05-14 09:53:32.060 +02:00] [ERR] [98] Jellyfin.Plugin.KodiSyncQueue.EntryPoints.UserSyncNotification: An error has occurred in UserUpdateTimerCallback
System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'System.Threading.ReaderWriterLockSlim'.
at System.Threading.ReaderWriterLockSlim.TryEnterReadLockCore(TimeoutTracker timeout)
at LiteDB.Engine.LockService.EnterTransaction()
at LiteDB.Engine.TransactionMonitor.GetTransaction(Boolean create, Boolean queryOnly, Boolean& isNew)
at LiteDB.Engine.QueryExecutor.ExecuteQuery(Boolean executionPlan)
at LiteDB.Engine.LiteEngine.Query(String collection, Query query)
at LiteDB.LiteQueryable`1.ToDocuments()+MoveNext()
at System.Linq.Enumerable.SelectEnumerableIterator`2.MoveNext()
at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable`1 source, Boolean& found)
at Jellyfin.Plugin.KodiSyncQueue.Data.DbRepo.<>c__DisplayClass10_0.<SetUserInfoSync>b__0(UserItemDataDto dto)
at System.Collections.Generic.List`1.ForEach(Action`1 action)
at Jellyfin.Plugin.KodiSyncQueue.Data.DbRepo.SetUserInfoSync(List`1 dtos, List`1 itemRefs, String userId)
at Jellyfin.Plugin.KodiSyncQueue.EntryPoints.UserSyncNotification.SaveUserChanges(List`1 dtos, List`1 itemRefs, String userName, String userId)
at Jellyfin.Plugin.KodiSyncQueue.EntryPoints.UserSyncNotification.SendNotifications(IEnumerable`1 changes, List`1 itemRefs, CancellationToken cancellationToken)
at Jellyfin.Plugin.KodiSyncQueue.EntryPoints.UserSyncNotification.UpdateTimerCallback(Object state)
Also getting this after upgrading 10.9.1, error in LibraryUpdateTimerCallback, maybe related ? Running in docker on debian
[2024-05-14 09:53:56.946 +02:00] [ERR] [89] Jellyfin.Plugin.KodiSyncQueue.EntryPoints.LibrarySyncNotification: An error has occurred in LibraryUpdateTimerCallback System.ObjectDisposedException: Cannot access a disposed object. Object name: 'System.Threading.ReaderWriterLockSlim'. at System.Threading.ReaderWriterLockSlim.TryEnterReadLockCore(TimeoutTracker timeout) at LiteDB.Engine.LockService.EnterTransaction() at LiteDB.Engine.TransactionMonitor.GetTransaction(Boolean create, Boolean queryOnly, Boolean& isNew) at LiteDB.Engine.QueryExecutor.ExecuteQuery(Boolean executionPlan) at LiteDB.Engine.LiteEngine.Query(String collection, Query query) at LiteDB.LiteQueryable`1.ToDocuments()+MoveNext() at System.Linq.Enumerable.SelectEnumerableIterator`2.MoveNext() at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable`1 source, Boolean& found) at Jellyfin.Plugin.KodiSyncQueue.Data.DbRepo.WriteLibrarySync(IEnumerable`1 items, ItemStatus status) at Jellyfin.Plugin.KodiSyncQueue.EntryPoints.LibrarySyncNotification.UpdateLibrary(IReadOnlyCollection`1 items, ItemStatus status) at Jellyfin.Plugin.KodiSyncQueue.EntryPoints.LibrarySyncNotification.PushChangesToDb(IReadOnlyCollection`1 itemsAdded, IReadOnlyCollection`1 itemsUpdated, IReadOnlyCollection`1 itemsRemoved) at Jellyfin.Plugin.KodiSyncQueue.EntryPoints.LibrarySyncNotification.LibraryUpdateTimerCallback(Object state)
Also "UserUpdateTimerCallback"
[2024-05-14 09:53:31.905 +02:00] [INF] [98] Jellyfin.Plugin.KodiSyncQueue.EntryPoints.UserSyncNotification: Started user data sync [2024-05-14 09:53:32.060 +02:00] [ERR] [98] Jellyfin.Plugin.KodiSyncQueue.EntryPoints.UserSyncNotification: An error has occurred in UserUpdateTimerCallback System.ObjectDisposedException: Cannot access a disposed object. Object name: 'System.Threading.ReaderWriterLockSlim'. at System.Threading.ReaderWriterLockSlim.TryEnterReadLockCore(TimeoutTracker timeout) at LiteDB.Engine.LockService.EnterTransaction() at LiteDB.Engine.TransactionMonitor.GetTransaction(Boolean create, Boolean queryOnly, Boolean& isNew) at LiteDB.Engine.QueryExecutor.ExecuteQuery(Boolean executionPlan) at LiteDB.Engine.LiteEngine.Query(String collection, Query query) at LiteDB.LiteQueryable`1.ToDocuments()+MoveNext() at System.Linq.Enumerable.SelectEnumerableIterator`2.MoveNext() at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable`1 source, Boolean& found) at Jellyfin.Plugin.KodiSyncQueue.Data.DbRepo.<>c__DisplayClass10_0.<SetUserInfoSync>b__0(UserItemDataDto dto) at System.Collections.Generic.List`1.ForEach(Action`1 action) at Jellyfin.Plugin.KodiSyncQueue.Data.DbRepo.SetUserInfoSync(List`1 dtos, List`1 itemRefs, String userId) at Jellyfin.Plugin.KodiSyncQueue.EntryPoints.UserSyncNotification.SaveUserChanges(List`1 dtos, List`1 itemRefs, String userName, String userId) at Jellyfin.Plugin.KodiSyncQueue.EntryPoints.UserSyncNotification.SendNotifications(IEnumerable`1 changes, List`1 itemRefs, CancellationToken cancellationToken) at Jellyfin.Plugin.KodiSyncQueue.EntryPoints.UserSyncNotification.UpdateTimerCallback(Object state)
I'm getting this error too and Kodi does not automatically sync content anymore.
Same thing here since the last 2 Jellyfin server updates:
[15:37:01] [ERR] [15] Jellyfin.Plugin.KodiSyncQueue.EntryPoints.LibrarySyncNotification: An error has occurred in LibraryUpdateTimerCallback
System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'System.Threading.ReaderWriterLockSlim'.
at System.Threading.ReaderWriterLockSlim.TryEnterReadLockCore(TimeoutTracker timeout)
at LiteDB.Engine.LockService.EnterTransaction()
at LiteDB.Engine.TransactionMonitor.GetTransaction(Boolean create, Boolean queryOnly, Boolean& isNew)
at LiteDB.Engine.QueryExecutor.ExecuteQuery(Boolean executionPlan)
at LiteDB.Engine.LiteEngine.Query(String collection, Query query)
at LiteDB.LiteQueryable`1.ToDocuments()+MoveNext()
at System.Linq.Enumerable.SelectEnumerableIterator`2.MoveNext()
at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable`1 source, Boolean& found)
at Jellyfin.Plugin.KodiSyncQueue.Data.DbRepo.WriteLibrarySync(IEnumerable`1 items, ItemStatus status)
at Jellyfin.Plugin.KodiSyncQueue.EntryPoints.LibrarySyncNotification.UpdateLibrary(IReadOnlyCollection`1 items, ItemStatus status)
at Jellyfin.Plugin.KodiSyncQueue.EntryPoints.LibrarySyncNotification.PushChangesToDb(IReadOnlyCollection`1 itemsAdded, IReadOnlyCollection`1 itemsUpdated, IReadOnlyCollection`1 itemsRemoved)
at Jellyfin.Plugin.KodiSyncQueue.EntryPoints.LibrarySyncNotification.LibraryUpdateTimerCallback(Object state)
Introduced by #78
Multiple upstream issue reports for the «Maximum number of transactions reached» error
mbdavid/LiteDB#2436 is listed as a likely fix
Some report downgrading LiteDB to 5.0.17 fixing that particular issue.
The «Cannot access a disposed object» error looks like a separate issue, not directly related.
Experiencing the same problem.
More than 1000 films. Same problem. Debian packages.
Please try plugin v11
Yes @crobibero I can't see the error anymore. Well done !
The error seems gone in the logs from th jellyfin server, but the sync is still not working in kodi...:(
@h3llrais3r
For me, after upgrading the plugin, the sync worked, but not fully. It synced some changed, but missed the others.
I did a library reset in Kodi using the Jellyfin plugin settings. Reset the DB, reset the images, but did not reset
the the plugin settings.
After Kodi restarted, the sync took about 45 minutes (I have a huge library) and everything seems to work a OK.
It was fast, easy and painless.
The plugin still gives errors at my side, see comment https://github.com/jellyfin/jellyfin-kodi/issues/861#issuecomment-2114252457
(I did not do a reset)
The plugin still gives errors at my side, see comment jellyfin/jellyfin-kodi#861 (comment)
(I did not do a reset)
That is a Kodi plugin issue, not a Jellyfin plugin issue.
Closing this issue as it is resolved.
That is a Kodi plugin issue, not a Jellyfin plugin issue.
Correct, this was just one part of the issue at server side, which is solved. The follow up for the client side issue for the sync is continued in https://github.com/jellyfin/jellyfin-kodi/issues/861
Jellyfin 10.9.0 (though this issue might have existed before, only with 10.9.0 the logs are not constantly filling and I was able to notice this one).
I believe this happened when I triggered the metadata refresh of my movie folder of which there are around 650.
Environment