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

~25 requests to jellyfin every 5 minutes? #387

Closed
1 task done
Emporea opened this issue May 18, 2023 · 7 comments · Fixed by #810 · May be fixed by #1294
Closed
1 task done

~25 requests to jellyfin every 5 minutes? #387

Emporea opened this issue May 18, 2023 · 7 comments · Fixed by #810 · May be fixed by #1294
Labels

Comments

@Emporea
Copy link

Emporea commented May 18, 2023

Description

Pihole on the local network revealed about 25 dns queries to jellyfin every 5 minutes. I traced this back to jellyseerr. Why so many?

This results in ~ 7200 queries per day from jellyseerr alone.

Let me know if I can help with any logs.

Version

1.5.0

Steps to Reproduce

Setup docker container with jellyfin and jellyseer and connect them.
let it run.

Screenshots

Screenshot 2023-05-19 at 00-42-18 Pi-hole - pihole

Pi-hole data from several days. Jellyfin domain receives abnormal requests

Logs

No response

Platform

desktop

Device

/

Operating System

/

Browser

/

Additional Context

No response

Code of Conduct

  • I agree to follow Overseerr's Code of Conduct
@fallenbagel
Copy link
Owner

fallenbagel commented May 18, 2023

Theres a jellyfin recently added sync job that runs every 5 minutes. That is why. If you want you can increase the cron timing of it to an hour to lessen the dns queries tho its just gonna leave you with a 1hm hour delay on syncing with jellyfin.

@fallenbagel
Copy link
Owner

I will be closing this issue as there are no follow ups. Feel free to reopen

@Emporea
Copy link
Author

Emporea commented Jun 10, 2023

I followed your suggestion and changed it to an hour. The question still remains: why it has to access the url so often per cron job execution. Isnt it possible to access it only once per jellyfin sync job?

@michelsup
Copy link

I face the same issue, I get hundreds of thousands of DNS request per day, it's insane. I'm sure there should be a possibility to cache the answer for a few minutes.

@fallenbagel
Copy link
Owner

fallenbagel commented Nov 14, 2023

It's because of the way jellyfin user token works. You have to first call jellyfin, get the user access token, then call again using the access token to see if admin user before running library scan and stuff. If docker add the hosts with the ip so it resolves within the docker or filter out the jellyfin domain.

You can add this

image: ....
extra_hosts:
  - "jellyfin.url.com:172.16.0.5"   # "domain:ip"

If you're on native, you can add it to /etc/hosts or just filter out the domain on your dns resolver.

Until how user access tokens are fixed on jellyfins side (there was discussion on a way to improve this and plans for it), there's nothing we can really do when using access tokens.

@michelsup
Copy link

Thank you very much @fallenbagel , I didn't thought about setting the IP within docker. Well done.

@fallenbagel fallenbagel mentioned this issue Apr 25, 2024
1 task
fallenbagel added a commit that referenced this issue May 23, 2024
…nd it to external api class

This fix should in theory use nodeCache with the help of the cacheManager class to cache
jellyfin/emby api requests. Jellyfin's standard Time-To-Live was set as 6 hours so as to ensure that
the cached data is relatively up to date without making excessive API requests. In addition, this
fix sets the checkPeriod for the jellyfin cache to 30 minutes as it sounds suitable enough for
checking and cleaning up expired cach entries without causing perfomance overhead.

fix #728, fix #387
fallenbagel added a commit that referenced this issue May 24, 2024
…quests

refactors jellyfin api requests to be handled by the external api
to be consistent with how other external api requests are made

related #728, related #387
fallenbagel added a commit that referenced this issue May 25, 2024
)

* refactor(jellyfinapi): use the external api class for jellyfin api requests

refactors jellyfin api requests to be handled by the external api
to be consistent with how other external api requests are made

related #728, related #387

* style: prettier formatted

* refactor(jellyfinapi): rename device in auth header as jellyseerr

* refactor(error): rename api error code generic to unknown

* refactor(errorcodes): consistent casing of error code enums
gauthier-th added a commit that referenced this issue Jun 1, 2024
gauthier-th added a commit that referenced this issue Jun 11, 2024
fallenbagel pushed a commit that referenced this issue Jun 11, 2024
@fallenbagel
Copy link
Owner

🎉 This issue has been resolved in version 1.9.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants