-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
[bug] "Too many open files" message appears when using the PlaybackReporting plugin API #12
Comments
Great bug report! Moving it to the plugin's repo. Also cc-ing @jellyfin/backend just in case. |
Is this still an issue with current master? |
I will test this and get back to you in a few days. |
Hi, Sorry it took so long for me to test. I tested the same way on a CentOS 7.9 VM, with Jellyfin 10.7.0 RC2. When the "too many open files" stacktrace happens, Jellyfin automatically restarts. This could be an issue for some people though (with big configuration that makes Jellyfin startup quite long for example). Thanks. PS: Here is a log extract of the issue and Jellyfin restart:
|
Describe the bug
I started using a Nagios/Shinken monitoring plugin of my own to get stats from Jellyfin to display in grafana dashboards.
It works great until Jellyfin starts throwing a "Too many open files" error, which causes the Web UI to be unavailable.
After a bit of investigating, it seems that the Playback reporting does not close some connections to its local db.
The Shinken plugin is executed every minute and performs http requests to the playback reporting plugin API.
The problem also appears when doing simple curl using a shell.
Please let me know if this is not the correct place to open this issue, and if you want me to open an issue on the playback_reporting repo instead.
System (please complete the following information):
To Reproduce
The simplest way to reproduce this error is by doing curls manually to the playback reporting plugin API. For example:
watch curl -v "http://jellyfin_addr:8096/emby/user_usage_stats/UserId/BreakDownReport?days=1&filter=Movie,Episode"
In parallel, you can see the open files list growing when doing the curls:
lsof -p JELLYFINPID | wc -l
The script I use for monitoring that caused the problem initially is available here: https://github.com/macarrie/check_jellyfin/blob/master/libexec/check_jellyfin.py
Expected behavior
Connections to playback reporting db are closed when necessary.
Logs
Journalctl logs at the moment the error appeared.
journalctl -u jellyfin
lsof -p JELLYFINPID
The playback_reporting open files lines occupy the major part on the fd list, with a total of elements being over 4000 items after the error appears:
The text was updated successfully, but these errors were encountered: