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 

 

上一篇:Fence Repair POJ - 3253


下一篇:应读者要求,今天分享单机百万 TCP 连接测试源码