Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jellyfin server : library sync - Maximum number of transactions reached #83

Closed
prahal opened this issue May 12, 2024 · 14 comments
Closed
Labels
bug This PR or Issue describes or fixes something that isn't working confirmed This Issue describes a bug that has been confirmed by a org member upstream This is an issue originating from upstream

Comments

@prahal
Copy link

prahal commented May 12, 2024

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

- OS: Linux helios64 6.8.5-edge-rockchip64 #2 SMP PREEMPT Wed Apr 10 14:38:25 UTC 2024 aarch64 GNU/Linux
- Linux Kernel: 6.8.5-edge-rockchip64 (Armbian)
- Virtualization: Docker
- Clients: web
- Browser: FF 125.0.3 64 bits
- FFmpeg Version:
- Playback Method:
- Hardware Acceleration:
- GPU Model:
- Plugins:
- Reverse Proxy:
- Base URL:
- Networking:
- Storage:
[17:02:18] [INF] [63] Jellyfin.Plugin.KodiSyncQueue.EntryPoints.LibrarySyncNotification: Started library sync
[17:02:18] [ERR] [63] 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)
@cryodream
Copy link

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)

@abbekeff

This comment was marked as off-topic.

@lldsolitude

This comment was marked as off-topic.

@oddstr13 oddstr13 added bug This PR or Issue describes or fixes something that isn't working confirmed This Issue describes a bug that has been confirmed by a org member upstream This is an issue originating from upstream labels May 14, 2024
@axionman

This comment was marked as off-topic.

@oddstr13
Copy link
Member

Introduced by #78

Multiple upstream issue reports for the «Maximum number of transactions reached» error

litedb-org/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.

@nothing2obvi
Copy link

Experiencing the same problem.

@bestouff
Copy link

bestouff commented May 15, 2024

More than 1000 films. Same problem. Debian packages.

@crobibero
Copy link
Member

Please try plugin v11

@bestouff
Copy link

Yes @crobibero I can't see the error anymore. Well done !

@h3llrais3r
Copy link

The error seems gone in the logs from th jellyfin server, but the sync is still not working in kodi...:(

@cryodream
Copy link

@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.

@h3llrais3r
Copy link

The plugin still gives errors at my side, see comment jellyfin/jellyfin-kodi#861 (comment)

(I did not do a reset)

@crobibero
Copy link
Member

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.

@h3llrais3r
Copy link

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 jellyfin/jellyfin-kodi#861

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This PR or Issue describes or fixes something that isn't working confirmed This Issue describes a bug that has been confirmed by a org member upstream This is an issue originating from upstream
Projects
None yet
Development

No branches or pull requests

10 participants