• Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below
  • Forum
  • Website
  • GitHub
  • Status
  • Translation
  • Features
  • Team
  • Rules
  • Help
  • Feeds
User Links
  • Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below

    Useful Links Forum Website GitHub Status Translation Features Team Rules Help Feeds
    Jellyfin Forum Support Troubleshooting "Too many open files in system error" during library scan

     
    • 0 Vote(s) - 0 Average

    "Too many open files in system error" during library scan

    Some media missing after scan, many errors in logs, SMB mounted store
    awkward-gopher
    Offline

    Junior Member

    Posts: 3
    Threads: 1
    Joined: 2025 Jan
    Reputation: 0
    Country:United States
    #1
    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.

    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?
    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)


    Messages In This Thread
    "Too many open files in system error" during library scan - by awkward-gopher - 2025-01-29, 03:07 PM
    RE: "Too many open files in system error" during library scan - by TheDreadPirate - 2025-01-29, 04:13 PM
    RE: "Too many open files in system error" during library scan - by awkward-gopher - 2025-01-30, 05:04 AM
    RE: "Too many open files in system error" during library scan - by awkward-gopher - 2025-01-31, 04:19 PM
    RE: "Too many open files in system error" during library scan - by gnattu - 2025-01-31, 07:48 PM

    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Home · Team · Help · Contact
    © Designed by D&D - Powered by MyBB
    L


    Jellyfin

    The Free Software Media System

    Linear Mode
    Threaded Mode