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