{"record":{"id":"a6c771970558785b","repo":"oven-sh/bun","slug":"systemfdquotaexceeded","errorCode":null,"errorMessage":"SystemFdQuotaExceeded","messagePattern":"SystemFdQuotaExceeded","errorType":"error_code","errorClass":"bun_install::Error","httpStatus":null,"severity":"error","filePath":"src/install/error.rs","lineNumber":13,"sourceCode":"#[derive(Debug, Clone, Copy, PartialEq, Eq, thiserror::Error)]\npub enum Error {\n    #[error(\"FileNotFound\")]\n    FileNotFound,\n    #[error(\"AccessDenied\")]\n    AccessDenied,\n    #[error(\"NotDir\")]\n    NotDir,\n    #[error(\"NameTooLong\")]\n    NameTooLong,\n    #[error(\"SymLinkLoop\")]\n    SymLinkLoop,\n    #[error(\"SystemFdQuotaExceeded\")]\n    SystemFdQuotaExceeded,\n    #[error(\"SystemResources\")]\n    SystemResources,\n    #[error(\"DeviceBusy\")]\n    DeviceBusy,\n    #[error(\"TarballHTTP400\")]\n    TarballHTTP400,\n    #[error(\"TarballHTTP401\")]\n    TarballHTTP401,\n    #[error(\"TarballHTTP402\")]\n    TarballHTTP402,\n    #[error(\"TarballHTTP403\")]\n    TarballHTTP403,\n    #[error(\"TarballHTTP404\")]\n    TarballHTTP404,\n    #[error(\"TarballHTTP4xx\")]\n    TarballHTTP4xx,\n    #[error(\"TarballHTTP5xx\")]","sourceCodeStart":1,"sourceCodeEnd":31,"githubUrl":"https://github.com/oven-sh/bun/blob/8c5296ac459e8252d3cd702f3fbcbb0c249d95d5/src/install/error.rs#L1-L31","documentation":"Installer error for fd exhaustion (the EMFILE family). Notably, libarchive's MakeLibUvOwned failure is mapped to this exact variant (see From<bun_libarchive::Error> in error.rs), so tarball extraction that cannot acquire descriptors also surfaces here. It means the process hit its open-file limit, not that disk or memory is exhausted.","triggerScenarios":"Large installs extracting many tarballs concurrently under a low `ulimit -n`; watchers/dev servers consuming the user's fd budget; extraction of huge dependency trees in constrained CI containers.","commonSituations":"macOS default 256 fd soft limit; containers with low RLIMIT_NOFILE; long-lived machines with many open editors/watchers during big installs.","solutions":["Raise the limit for the session before installing: ulimit -n 4096 (macOS persistent: sudo launchctl limit maxfiles)","Close fd-heavy processes (watchers, editors) during large installs","Configure the CI runner/container with a higher nofile limit (docker --ulimit nofile=8192)","Retry after freeing descriptors; bun resumes from partial install state"],"exampleFix":"# before\nbun install   # -> SystemFdQuotaExceeded\n\n# after\nulimit -n 4096\nbun install","handlingStrategy":"validation","validationCode":"# fail fast if the fd soft limit is too low for a big install\nSOFT=$(ulimit -Sn)\n[ \"$SOFT\" -lt 2048 ] && { echo \"raise fd limit: ulimit -n 2048\"; exit 1; }\nbun install","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Set nofile in CI container config (docker --ulimit nofile=8192)","Run big installs in a fresh shell with a raised limit","Stop fd-heavy watchers before installing"],"tags":["install","system-limits","emfile","extraction"],"backgroundTag":null,"analyzedSha":"8c5296ac459e8252d3cd702f3fbcbb0c249d95d5","analyzedAt":"2026-08-16T08:01:58.794Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}