jellyfin / jellyfin-plugin-anidb

This plugin adds the metadata provider for aniDB to Jellyfin
GNU General Public License v2.0
31 stars 13 forks source link

Increased Missing root element errors since 10.9.4 #70

Open Byorun opened 3 months ago

Byorun commented 3 months ago

Since the Upgrade from 10.9.2 to 10.9.4 I noticed that my NAS was rather noisy Düring library Scans. It was rescanning a lot of series for unknown reasons. This resulted in an instant ban from anidb. As soon as you see the message 500 banned in the logs the plugin begins to write empty series.xml files to the cache directory which then result in the missing root element error for consecutive scans. Maybe I am imagine things, but I seams to me that this error increases with each scan since more and more series will be rescanned because of the missing/broken cache files

nalsai commented 3 months ago

This contains multiple issues:

  1. The internal rate limiter needs to be improved. It currently only ensures a high enough interval in between requests if scans run sequentially (-> no parallel scans). If requests get made without enough time in between, you get banned immediately. Also, once a ban is detected, no new requests should be made until the ban is over.
  2. Empty series.xml files get written to the cache directory. This shouldn't happen and/or be handled better.

Cache files should be refreshed every 7 days (unless you configured it differently in the plugin settings), regardless of if they are correct or broken.

Also, would you mind telling me how big your library is (how many series and how many episodes in total)? As you may know, scanning too many files in a short period of time always gets you banned, so how to ideally handle very large libraries is still an open question.

I don't know why it was rescanning a lot of series, but the anidb plugin shouldn't have anything to do with that.

Byorun commented 3 months ago

My library is about 1500 series with about 15000 episodes. As long as only the new episodes are scanned (between 1-7 depending on how good the current season is) everything is more or less fine. But after the upgrade jellyfin for whatever reason decided to (re)scan more than nessesary which bubbled up more than 100 updates per scan which gets me banned almost instantly

Byorun commented 3 months ago

Sorry wrong button

enter-a-random-username commented 2 months ago

I got the same issue and it feels like endless requests and it looks like I'm always banned api.anidb.net:9001

 [ERR] [83] MediaBrowser.Providers.TV.EpisodeMetadataService: Error in AniDB
  jellyfin[2791681]: System.Net.Http.HttpRequestException: Connection refused (api.anidb.net:9001)
  jellyfin[2791681]:  ---> System.Net.Sockets.SocketException (111): Connection refused

So many failed requests in log files. Even after waiting some time (hours) it starts with those errors.

Edit: Now anidb is on maintenance mode - maybe it is related

nille02 commented 1 week ago

i have the same issue and i just deleted all 0 byte serien.xml files. find /var/cache/jellyfin/anidb/series -size 0 and you ran remove them with find /var/cache/jellyfin/anidb/series -size 0 -delete