NodeJS error “EMFILE, too many open files” on Mac OS

后端 未结 11 655
醉话见心
醉话见心 2020-12-22 16:53

For sometime I am having the following error:

Error: EMFILE, too many open files  \'/Users/blagus/Gallery/Websites/Nicsware/Pills/resources/core/auth.node.js         


        
11条回答
  •  遥遥无期
    2020-12-22 17:32

    i had this error and the ulimit and launchclt didn't work for me,

    this solution from http://yabfog.com/blog/2014/10/22/yosemite-upgrade-changes-open-file-limit worked for me

    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
    

    and then putting the

    ulimit -n 65536 65536
    

    into ~/.bashrc

提交回复
热议问题