Shell

bash: ulimit -n: open files limit too low

Linux / macOS shells, Node/bundler toolchains

EMFILE, 'too many open files', or watch/build processes crash under load.

What it means (root cause)

The per-process file descriptor limit (ulimit -n) is below what large module graphs or dev servers require.

The symptom developers actually see: EMFILE, 'too many open files', or watch/build processes crash under load.

How to avoid it: Set nofile limits in your container/base image and CI runners proactively.

Step-by-step fix

Concrete, ordered steps from the dataset. Apply them in order; each line is a verified action, not generic advice.

  1. 1Check current limit: ulimit -n.
  2. 2Raise for the session: ulimit -n 65536 (may require sudo for hard limits).
  3. 3Persist via /etc/security/limits.conf (soft nofile / hard nofile) and re-login.
  4. 4On macOS also raise the kernel max: sudo launchctl limit maxfiles 65536 200000.

Where this error appears

Languages, frameworks, and runtimes where this error is observed (from the 2026 DevFixPro error dataset, retrieved 2026-08-29):

Linux / macOS shellsNode/bundler toolchains

Any Unix shell running a toolchain that opens many files at once (webpack/vite watchers, test runners). Container and CI defaults are often 1024.

How to prevent it & common questions

Practical prevention plus the questions developers ask most about this error.

What does "bash: ulimit -n: open files limit too low" mean?

The per-process file descriptor limit (ulimit -n) is below what large module graphs or dev servers require.

Which environments are affected by bash: ulimit -n: open files limit too low?

Linux / macOS shells, Node/bundler toolchains

How do I fix bash: ulimit -n: open files limit too low?

Check current limit: ulimit -n. Raise for the session: ulimit -n 65536 (may require sudo for hard limits). Persist via /etc/security/limits.conf (soft nofile / hard nofile) and re-login. On macOS also raise the kernel max: sudo launchctl limit maxfiles 65536 200000.

How do I prevent bash: ulimit -n: open files limit too low?

Set nofile limits in your container/base image and CI runners proactively.

Related DevFixPro tools

Real, browser-only utilities on DevFixPro that help while you work through this issue. These are navigation aids, not a substitute for the fix above.

● Data updated 2026-08-29

Sources & attribution

  • Error records aggregated from Google Search Console query gaps (2026-05-21~2026-08-18) for devfixpro.com, plus official framework docs (MDN, Node.js docs, Python docs, Go.dev, Rust book, Oracle Java docs, Docker docs, npm docs). Source dataset retrieved 2026-08-29. License: CC BY 4.0 — attribute DevFixPro (devfixpro.com).
  • Official reference: https://ss64.com/bash/ulimit.html
  • All cause, environment, fix and prevention text on this page is taken verbatim from the DevFixPro 2026 error dataset. DevFixPro does not invent root causes or fixes.
How this bash: ulimit -n: open files limit too low page is built

Each error page is generated from a single record in the DevFixPro 2026 error dataset. The meaning, root cause, environments, fix steps, prevention, and official references are copied verbatim from that dataset and its official-doc sources; related-error links are computed from the error's category and explicit peer list. No root cause or fix is invented. The retrieval date for this dataset is 2026-08-29.

← Back to all errors