“连接EMFILE” Node.js中的错误 [英] "connect EMFILE" error in Node.js
本文介绍了“连接EMFILE” Node.js中的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
{[错误:连接EMFILE]代码:'EMFILE',errno:'EMFILE ',syscall:'connect'}
错误:连接EMFILE
在errnoException(net.js:670:11)
在连接(net.js:548:19)
在net.js:607:9
在Array.0(dns.js:88:18)
在EventEmitter._tickCallback(node.js:192:40)
任何人有理由为什么会崩溃?和想法如何解决?
我正在使用Express.js和Socket.io。它在Ubuntu上运行。
解决方案
EMFILE
错误意味着操作系统拒绝你的程序打开更多的文件/套接字。
I have very recently received a lot of traffic to my site that runs Node.js. With the increasing traffic it has started to crash a lot, which has not happened before. I get the following error in my log:
{ [Error: connect EMFILE] code: 'EMFILE', errno: 'EMFILE', syscall: 'connect' }
Error: connect EMFILE
at errnoException (net.js:670:11)
at connect (net.js:548:19)
at net.js:607:9
at Array.0 (dns.js:88:18)
at EventEmitter._tickCallback (node.js:192:40)
Anyone that have an idea why it crash? And ideas how to solve it?
I'm using Express.js and Socket.io. It runs on Ubuntu.
解决方案
EMFILE
error means that the OS is denying your program to open more files/sockets.
Have a look at: How do I change the number of open files limit in Linux?
这篇关于“连接EMFILE” Node.js中的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文