Solve Error: ENFILE: file table overflow

 

When you run:

hexo clean && hexo g

You might get the following error:

 

err: [Error: ENFILE: file table overflow, open '/<YourFilePath>/<YourFile>'] {
    errno: -23,
    code: 'ENFILE',
    syscall: 'open',
    path: '<YourFilePath>'
  }

 

To solve this, run the following commands:

 

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 

 

posted @ 2021-10-04 07:56  Grandyang  阅读(515)  评论(0编辑  收藏  举报
Fork me on GitHub