rustfs/rustfs · error · DiskError

too many open files, please increase 'ulimit -n'

Error message

too many open files, please increase 'ulimit -n'

What it means

TooManyOpenFiles is a DiskError sentinel: the process hit its file-descriptor limit (EMFILE) opening files/sockets on this drive. The message names the fix: raise 'ulimit -n'; under load it appears as spurious open failures across all drives.

Source

Thrown at crates/ecstore/src/disk/error.rs:80

    #[error("inconsistent drive found")]
    InconsistentDisk,

    #[error("drive does not support O_DIRECT")]
    UnsupportedDisk,

    #[error("drive path full")]
    DiskFull,

    #[error("disk not a dir")]
    DiskNotDir,

    #[error("disk not found")]
    DiskNotFound,

    #[error("drive still did not complete the request")]
    DiskOngoingReq,

    #[error("drive is part of root drive, will not be used")]
    DriveIsRoot,

    #[error("remote drive is faulty")]
    FaultyRemoteDisk,

    #[error("drive is faulty")]
    FaultyDisk,

    #[error("drive access denied")]
    DiskAccessDenied,

    #[error("file not found")]
    FileNotFound,

    #[error("file version not found")]
    FileVersionNotFound,

    #[error("too many open files, please increase 'ulimit -n'")]

View on GitHub (pinned to 5dca076efe)

Solutions

  1. Raise the fd limit (ulimit -n / systemd LimitNOFILE) and restart the service
  2. Reduce concurrent workload or leaking fd holders
  3. Monitor fd usage to catch leaks before they exhaust the limit
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at crates/ecstore/src/disk/error.rs:80 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of rustfs/rustfs@5dca076efe (2026-08-20). Data as JSON: /api/errors/ff90e1d3a894f6bf. Report an issue: GitHub.