vosmiic / jellyfin-ani-sync

Synchronize anime watch status between Jellyfin and anime tracking sites.
GNU General Public License v3.0
215 stars 15 forks source link

AniList timeout issue #122

Closed vosmiic closed 4 weeks ago

vosmiic commented 2 months ago

Edit: Yup, the timeout error does indeed still exist too!

Originally posted by @Jtecx in https://github.com/vosmiic/jellyfin-ani-sync/issues/114#issuecomment-2074605898

vosmiic commented 2 months ago

So I presume you are seeing 429 responses from the API in the logs? I think there are two solutions to this; I can either create a quick fix that basically increases the timeout between API calls and then upload the plugin here, and you can manually install it. Or, if it is suitable, I am planning on properly handling 429's by simply retrying the call after a certain amount of time. This is probably going to require a decent amount of dev time and since I am currently unable to work on the plugin this probably won't be out in a beta release until mid to late May.

mmshivesh commented 2 months ago

+1 on this issue, have constantly failing requests:

[2024-04-28 21:59:20.746 -07:00] [ERR] [46] jellyfin_ani_sync.Api.AuthApiCall: Unable to complete AniList API call (POST https://graphql.anilist.co), reason: TooManyRequests; Too Many Requests

Additionally, could a popup/toast be shown when a "Manual Sync" has started running? This would stop people from clicking multiple times making this problem worse.

Or, if it is suitable, I am planning on properly handling 429's by simply retrying the call after a certain amount of time.

This sounds like a good approach, maybe paired with an exponential backoff as well?

BlakeTech commented 2 months ago

yeah, I'd say increasing the time-between-retries could work, since I haven't actually verified if the plugin is properly respecting the ignored libraries part yet either from the original issue #114 that this new thread is split from.

Edit: github's being weird. Didn't realize it's using my alts too to post for some reason. @Jtecx and @BlakeTech are the same user. XD Sorry!

vosmiic commented 2 months ago

Okay, as a temporary workaround I will extend the timeout and create a new beta release with the fix included.

Additionally, could a popup/toast be shown when a "Manual Sync" has started running? This would stop people from clicking multiple times making this problem worse.

Yeah I'll look into that.

This sounds like a good approach, maybe paired with an exponential backoff as well?

Yeah good idea, will add that when I create the proper fix later on.

vosmiic commented 1 month ago

Just to reassure all who are seeing this issue, I am planning on releasing a new version of the plugin once I get my dev PC back with a fix for this.

vosmiic commented 1 month ago

So a PR has been created that should fix the AniList timeout issue. Hopefully the PR description explains how it does this, but I can expand on it if anyone is interested. I have done some basic testing which resulted in no 429 issues but I wasn't experiencing 429 issues before so its difficult for me to properly test this. If anyone would like to test it, a docker version has been created, or I can build a version and post it here if anyone does not feel comfortable building it themselves.

vosmiic commented 4 weeks ago

Going to merge the PR which will eventually go into a beta release, hopefully this fixes the timeout issues. Will close this but feel free to re-open if you continue to see the issues in the beta/full release.