node.js Error: connect EMFILE

报错原因是文件句柄不够用了,修改  ulimit 即可,步骤如下:

1.vim /etc/security/limits.conf

2.添加两行内容: 
* soft nofile 65536 
* hard nofile 65536

3.退出当前终端,再进  ulimit -a 查看。

虽然显示对了,但是感觉上没好使,难道真的需要重启机器吗?

猜你喜欢

转载自www.cnblogs.com/workharder/p/10372472.html