2025-01-29, 03:07 PM
Greetings!
I'm running jellyfin in a docker container on spare MacOS laptop. I run it via docker compose.
I mount a volume via SMB called "jellyfin" from a Synology NAS which is where all of my media is stored. When I run a library scan, it will run for a while, then these errors will start pouring out:
I've noticed some media is missing in the web UI which is present in the file structure, and I suspect the root cause of the issue is these errors (though I could be wrong).
I've tried checking the
Does anyone have any good troubleshooting ideas? Here are some questions that come to mind.
1. Is there some way to slow the scan down a bit to allow the file handles to close in time?
2. Is there some way of testing by opening a bunch of file handles on my SMB mount? Maybe this is only a problem over SMB?
3. Is there a bug that's keeping the file handles open for longer than they should be?
I'm running jellyfin in a docker container on spare MacOS laptop. I run it via docker compose.
Code:
jellyfin:
container_name: jellyfin
image: jellyfin/jellyfin
network_mode: host
restart: unless-stopped
volumes:
- ./jellyfin-config:/config
- /Volumes/jellyfin:/data
ports:
- "8096:8096"
environment:
- PUID=1000
- PGID=1000
- TZ=America/Los_Angeles
I mount a volume via SMB called "jellyfin" from a Synology NAS which is where all of my media is stored. When I run a library scan, it will run for a while, then these errors will start pouring out:
Code:
jellyfin | System.IO.IOException: Too many open files in system : '/data/shows/Yada-Yada/Season 4/metadata/YadaYada.jpg'
jellyfin | at System.IO.FileSystemInfo.Create(String fullPath, String fileName, Boolean asDirectory, FileStatus& fileStatus)
jellyfin | at System.IO.Enumeration.FileSystemEntry.ToFileSystemInfo()
jellyfin | at System.IO.Enumeration.FileSystemEnumerator`1.MoveNext()
jellyfin | at System.Linq.Enumerable.SelectEnumerableIterator`2.ToArray()
jellyfin | at MediaBrowser.Controller.Providers.DirectoryService.GetFiles(String path)
jellyfin | at MediaBrowser.LocalMetadata.Images.EpisodeLocalImageProvider.GetImages(BaseItem item, IDirectoryService directoryService)
jellyfin | at System.Linq.Enumerable.SelectManySingleSelectorIterator`2.ToList()
jellyfin | at MediaBrowser.Providers.Manager.MetadataService`2.RefreshMetadata(BaseItem item, MetadataRefreshOptions refreshOptions, CancellationToken cancellationToken)
I've noticed some media is missing in the web UI which is present in the file structure, and I suspect the root cause of the issue is these errors (though I could be wrong).
I've tried checking the
ulimit
on the MacOS host, as well as within the docker container. All of the limits I've seen appear quite high, or I made them quite high.Does anyone have any good troubleshooting ideas? Here are some questions that come to mind.
1. Is there some way to slow the scan down a bit to allow the file handles to close in time?
2. Is there some way of testing by opening a bunch of file handles on my SMB mount? Maybe this is only a problem over SMB?
3. Is there a bug that's keeping the file handles open for longer than they should be?