Skip to content

Error: EMFILE, too many open files '/proc/14960/stat #17

wwwy3y3 opened this Issue Feb 7, 2013 · 2 comments

2 participants

wwwy3y3 commented Feb 7, 2013


I ran into this error

nodefly error: { [Error: EMFILE, too many open files '/proc/14960/stat']
 errno: 20,
 code: 'EMFILE',
 path: '/proc/14960/stat', syscall: 'open' } 
 Error: EMFILE, too many open files '/proc/14960/stat'
   at Object.fs.openSync (fs.js:338:18)
   at Object.fs.readFileSync (fs.js:182:15)
   at Object.exports.cpuutil    (/home/ubuntu/prod/node_modules/nodefly/lib/cpuinfo.js:22:22)
   at collect (/home/ubuntu/prod/node_modules/nodefly/lib/info.js:78:23)
   at Timer.<anonymous> (/home/ubuntu/prod/node_modules/nodefly/lib/info.js:41:4)
   at Timer.exports.setInterval.timer.ontimeout (timers.js:234:14)

what does that mean?

seem to happen only on high load


This was an unhandled edge case in our agent, I have fixed it in version 0.1.26. The agent will no longer throw an exception if it cannot open read the stat file.

It is unlikely that our agent is using up the file handles, is your application opening individual files each request? You may want to also boost the number of allowable file handles:

wwwy3y3 commented Feb 9, 2013

turn out I'm not using NODE_ENV=production in express
I will also notice the ulimit!

@wwwy3y3 wwwy3y3 closed this Feb 9, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.