FLYNNLABAboutMeCodingActivityStudy 2024초등수학
issue : ENFILE: file table overflow
nodejs, issue, osx

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