issue : ENFILE: file table overflow

Issue

nodejs환경에서 test를 돌리는데 ENFILE: file table overflow 관련 오류가 발생했다.

Environment

  • osx
  • nodejs

Resolve

os에서 file open 개수가 작게 잡혀 있어서 생긴 이슈 였다.
이를 변경해서 해결했다.

$ echo kern.maxfiles=65536 | sudo tee -a /etc/sysctl.conf
$ echo kern.maxfilesperproc=65536 | sudo tee -a /etc/sysctl.conf
$ sudo sysctl -w kern.maxfiles=65536
$ sudo sysctl -w kern.maxfilesperproc=65536
$ ulimit -n 65536 65536

Reference

Yosemite Upgrade Changes Open File Limit

Subscribe to flynn's devnote

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe