[BUG] JELLYFIN_CONFIG_DIR=/config makes .NET watch the entire /config tree (incl. metadata), exhausting inotify watches
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 25/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- csharp, docker, dockerfile, linux
- 領域
- devops, infrastructure
調査の方向性
Start with the svc-jellyfin run script, where JELLYFIN_CONFIG_DIR is exported as /config, and with the Dockerfile that sets the default config path. Confirm the watch count by comparing inotify watches to the directories under /config. Done means Jellyfin only watches its config files, with existing installs migrated safely, and the choice between a /config/config subfolder and a Dockerfile-level override is settled first.
索引モデルが issue の本文から書いたものです。
説明
Is there an existing issue for this?
- I have searched the existing issues
Related: #331 (same symptom, attributed to real-time monitoring) and #22 (config path differs from the official image).
Current Behavior
The svc-jellyfin run script exports JELLYFIN_CONFIG_DIR="/config". Jellyfin registers its logging config with SetBasePath(appPaths.ConfigurationDirectoryPath) and AddJsonFile(..., reloadOnChange: true) (Jellyfin.Server/Program.cs ~L400-403). On Linux, .NET's physical file provider watches that base path recursively (one inotify watch per subdirectory). With the config dir set to /config, that includes /config/data/metadata, /config/cache, etc.
Measured on a host running linuxserver/jellyfin 12.2:
/config/data/metadataholds ~96,000 directories (mostlyPeople/*).- The Jellyfin process holds 117,465 inotify watches, all on the
/configfilesystem (sampled inodes resolve to/configand/config/data/metadata/People/...). - Disabling real-time monitoring on every library and restarting changes nothing (still 117,465).
- Because the limit is per UID, other containers running as the same PUID run out of watches. In our case Plex's EasyAudioEncoder failed with
EAE timeout! EAE not running, or wrong folder?.
This is why #331 saw exhaustion that did not go away with real-time monitoring settings.
Expected Behavior
Only Jellyfin's actual config files (system.xml, logging*.json, ...) are watched, as with the official image, where the config dir is a dedicated subfolder and the watch count stays small.
Possible backward-compatible fix: point JELLYFIN_CONFIG_DIR at a dedicated folder (e.g. /config/config) with a one-time init step that moves *.xml / logging*.json there if they still sit in /config. Or, as suggested in #22, move the env into the Dockerfile so users can override it.
Steps To Reproduce
- Run
linuxserver/jellyfinwith a library large enough to produce a few thousand metadata folders. - Count watches held by Jellyfin:
cat /proc/$(pgrep -f /usr/bin/jellyfin)/fdinfo/* | grep -c '^inotify wd:' - Compare with
find /config -xdev -type d | wc -linside the container: the watch count tracks the total number of directories under/config. - Disable real-time monitoring for all libraries and restart: the count does not change.
Environment
- OS: Debian-based umbrelOS 2.0 (host 1); Ubuntu 24.04 VPS (host 2, small library, same pattern: ~2 watches per directory under
/config) - How docker service was installed: distro packages / umbrelOS
CPU architecture
x86-64
Docker creation
services:
jellyfin:
image: linuxserver/jellyfin:version-12.2ubu2604
environment:
- PUID=1000
- PGID=1000
volumes:
- ./jellyfin:/config
Container logs
No Jellyfin errors; the effect shows up in other processes under the same UID, e.g. Plex:
[eac3_eae] EAE timeout! EAE not running, or wrong folder? Could not read '/run/plex-temp/.../EasyAudioEncoder/Convert to WAV (to 8ch or less)/...'
Host: fs.inotify.max_user_watches = 122404; watches in use by UID 1000 = 122386 (Jellyfin 117465, Syncthing 4751)
Investigated and written with the help of an AI assistant; all numbers above were measured on my own servers.
- 主要言語
- Dockerfile
- スター
- 909
- フォーク
- 136
- 平均マージ
- 4時間 31分
- マージ済み PR(30日)
- 1
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
linuxserver/docker-jellyfin のほかの issue
-
no-issue-activity
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
linuxserver/docker-jellyfin#336 · コメント 3 件 · リアクション 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
linuxserver/docker-jellyfin#343 · コメント 20 件 ·
-
Critical Bug: Core migration initiated on V12 but resulted in 0-byte database truncation on UGOS Proオープンno-issue-activity
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
linuxserver/docker-jellyfin#339 · コメント 6 件 ·
linuxserver/docker-jellyfin の issue をすべて見る
似ている issue
-
windows-artifacts: the win-arm64 job uses a Visual Studio generator missing from windows-11-armオープン
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
-
Own-agent checks: reject the Actions bot id in admit.mjs and test the source label in pr-verifyオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
melodic-software/claude-code-plugins#17374 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
area: doc-engine area: infrastructure bug community-request
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
snapotter-hq/SnapOtter#4834 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
soroswap/token-list#125 ·
メンテナーはふだん 1 日以内に返信