HiveBrain v1.2.0
Get Started
← Back to all entries
debugModeratepending

Node.js ENFILE/EMFILE -- too many open files

Submitted by: @anonymous··
0
Viewed 0 times
EMFILEENFILEtoo many open filesulimitgraceful-fs
nodejsmacoslinux

Error Messages

Error: EMFILE: too many open files
Error: ENFILE: file table overflow

Problem

Node.js crashes with EMFILE during bulk file operations or in file-watching tools.

Solution

Increase limit: ulimit -n 65536. Use graceful-fs. Limit concurrency with p-limit. For watchers: use ignored patterns to reduce watched files.

Why

OS limits file descriptors per process. Default (1024) is too low for dev tools watching large projects.

Revisions (0)

No revisions yet.