docs(troubleshooting): add inotify limits documentation and workaround

Add comprehensive troubleshooting documentation for inotify instance limit
errors that cause Jellyfin crashes in environments with many containers.

Changes:
- Add Troubleshooting section to README with inotify limits explanation
- Document proper solution: increase kernel limits via sysctl
- Provide workaround for managed clusters: DOTNET_USE_POLLING_FILE_WATCHER
- Add commented example in values.yaml for easy copy-paste
- Update Chart version from 2.5.0 to 2.5.1
- Add Artifact Hub changelog annotation

The proper solution is to increase inotify limits on Kubernetes nodes:
```bash
sysctl -w fs.inotify.max_user_instances=512
```

For managed Kubernetes where node access is restricted, users can use the
polling workaround (less efficient but functional):
```yaml
jellyfin:
  env:
    - name: DOTNET_USE_POLLING_FILE_WATCHER
      value: "1"
```

This addresses the crash issue mentioned in #64.

Fixes: #64

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>
This commit is contained in:
Aleksei SviridkinandClaude committed 2025-11-05 23:32:38 +03:00 Unverified
1 parent 2401a45bb1
commit 4a45dc998a
4 files changed
+92 -3

No files matched your search

+5 -1
View File
@@ -8,5 +8,9 @@ keywords:
- jellyfin
- media
- self-hosted
version: 2.5.0
version: 2.5.1
appVersion: 10.11.2
annotations:
artifacthub.io/changes: |
- kind: added
description: Add troubleshooting documentation for inotify instance limits with workaround example
+43 -2
View File
@@ -1,6 +1,6 @@
# jellyfin
![Version: 2.5.0](https://img.shields.io/badge/Version-2.5.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 10.11.2](https://img.shields.io/badge/AppVersion-10.11.2-informational?style=flat-square)
![Version: 2.5.1](https://img.shields.io/badge/Version-2.5.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 10.11.2](https://img.shields.io/badge/AppVersion-10.11.2-informational?style=flat-square)
A Helm chart for Jellyfin Media Server
@@ -68,7 +68,7 @@ helm install my-jellyfin jellyfin/jellyfin -f values.yaml
| jellyfin.args | list | `[]` | Additional arguments for the entrypoint command. |
| jellyfin.command | list | `[]` | Custom command to use as container entrypoint. |
| jellyfin.enableDLNA | bool | `false` | Enable DLNA. Requires host network. See: https://jellyfin.org/docs/general/networking/dlna.html |
| jellyfin.env | list | `[]` | Additional environment variables for the container. |
| jellyfin.env | list | `[]` | Additional environment variables for the container. Example: Workaround for inotify limits (see Troubleshooting section in README) |
| livenessProbe | object | `{"initialDelaySeconds":10,"tcpSocket":{"port":"http"}}` | Configure liveness probe for Jellyfin. |
| metrics | object | `{"enabled":false,"serviceMonitor":{"enabled":false,"interval":"30s","labels":{},"metricRelabelings":[],"namespace":"","path":"/metrics","port":8096,"relabelings":[],"scheme":"http","scrapeTimeout":"30s","targetLabels":[],"tlsConfig":{}}}` | Configuration for metrics collection and monitoring |
| metrics.enabled | bool | `false` | Enable or disable metrics collection |
@@ -160,3 +160,44 @@ extraVolumeMounts:
- name: hwa
mountPath: /dev/dri
```
## Troubleshooting
### inotify Instance Limit Reached
**Problem:** Jellyfin crashes with error:
```
System.IO.IOException: The configured user limit (128) on the number of inotify instances has been reached
```
**Root cause:** The Linux kernel has a limit on inotify instances (file system watchers) per user. Jellyfin uses inotify to monitor media libraries for changes.
**Proper solution (recommended):**
Increase the inotify limit on the Kubernetes nodes:
```bash
# Temporary (until reboot)
sysctl -w fs.inotify.max_user_instances=512
# Permanent
echo "fs.inotify.max_user_instances=512" >> /etc/sysctl.conf
sysctl -p
```
Recommended values:
- `fs.inotify.max_user_instances`: 512 or higher
- `fs.inotify.max_user_watches`: 524288 or higher (if you have large media libraries)
**Workaround (if you cannot modify host settings):**
If you're running on a managed Kubernetes cluster where you cannot modify node-level settings, you can force Jellyfin to use polling instead of inotify. **Note: This is less efficient and may increase CPU usage and delay change detection.**
```yaml
jellyfin:
env:
- name: DOTNET_USE_POLLING_FILE_WATCHER
value: "1"
```
This workaround disables inotify file watching in favor of periodic polling, which doesn't require inotify instances but is less efficient.
+41
View File
@@ -85,3 +85,44 @@ extraVolumeMounts:
- name: hwa
mountPath: /dev/dri
```
## Troubleshooting
### inotify Instance Limit Reached
**Problem:** Jellyfin crashes with error:
```
System.IO.IOException: The configured user limit (128) on the number of inotify instances has been reached
```
**Root cause:** The Linux kernel has a limit on inotify instances (file system watchers) per user. Jellyfin uses inotify to monitor media libraries for changes.
**Proper solution (recommended):**
Increase the inotify limit on the Kubernetes nodes:
```bash
# Temporary (until reboot)
sysctl -w fs.inotify.max_user_instances=512
# Permanent
echo "fs.inotify.max_user_instances=512" >> /etc/sysctl.conf
sysctl -p
```
Recommended values:
- `fs.inotify.max_user_instances`: 512 or higher
- `fs.inotify.max_user_watches`: 524288 or higher (if you have large media libraries)
**Workaround (if you cannot modify host settings):**
If you're running on a managed Kubernetes cluster where you cannot modify node-level settings, you can force Jellyfin to use polling instead of inotify. **Note: This is less efficient and may increase CPU usage and delay change detection.**
```yaml
jellyfin:
env:
- name: DOTNET_USE_POLLING_FILE_WATCHER
value: "1"
```
This workaround disables inotify file watching in favor of periodic polling, which doesn't require inotify instances but is less efficient.
+3
View File
@@ -192,7 +192,10 @@ jellyfin:
# -- Additional arguments for the entrypoint command.
args: []
# -- Additional environment variables for the container.
# Example: Workaround for inotify limits (see Troubleshooting section in README)
env: []
# - name: DOTNET_USE_POLLING_FILE_WATCHER
# value: "1"
persistence:
config: