Closed amadanmath closed 11 years ago
I may be getting the same error. This is happening in both small and large repos.
child_process.js:927 throw errnoException(process._errno, 'spawn'); ^ Error: spawn EMFILE at errnoException (child_process.js:980:11) at ChildProcess.spawn (child_process.js:927:11) at exports.spawn (child_process.js:715:9) at Object.exports.execFile (child_process.js:607:15) at Object.exports.exec (child_process.js:578:18) at /usr/local/share/npm/lib/node_modules/ungit/source/git.js:12:31 at Object.q.process as _onImmediate at processImmediate as _immediateCallback
Should be solved with 0.1.6, please re-open if it still occurs.
I've just installed 0.1.6 and I seem to be getting the same issue. I have a fairly large git repo.
error: Error: EMFILE, open '/usr/local/lib/node_modules/ungit/public/images/branchIcon.png'
child_process.js:927 throw errnoException(process._errno, 'spawn'); ^ Error: spawn EMFILE at errnoException (child_process.js:980:11) at ChildProcess.spawn (child_process.js:927:11) at exports.spawn (child_process.js:715:9) at Object.exports.execFile (child_process.js:607:15) at Object.exports.exec (child_process.js:578:18) at /usr/local/lib/node_modules/ungit/source/git.js:12:31 at Object.q.process as _onImmediate at processImmediate as _immediateCallback ungit can't start, see logs for more information.
I have the same issue
info: GET /images/shadowArrowRight.png info: GET /images/blueArrowRight.png
child_process.js:927 throw errnoException(process._errno, 'spawn'); ^ Error: spawn EMFILE at errnoException (child_process.js:980:11) at ChildProcess.spawn (child_process.js:927:11) at exports.spawn (child_process.js:715:9) at Object.exports.execFile (child_process.js:607:15) at Object.exports.exec (child_process.js:578:18) at /usr/local/lib/node_modules/ungit/source/git.js:12:31 at Object.q.process as _onImmediate at processImmediate as _immediateCallback info: socket.io started info: Listening on port 8448
info: handshake authorized
I get the same error:
info: GET /api/diff?file=somefile&path=somepath
child_process.js:927
throw errnoException(process._errno, 'spawn');
^
Error: spawn EMFILE
at errnoException (child_process.js:980:11)
at ChildProcess.spawn (child_process.js:927:11)
at exports.spawn (child_process.js:715:9)
at Object.exports.execFile (child_process.js:607:15)
at Object.exports.exec (child_process.js:578:18)
at /usr/local/lib/node_modules/ungit/source/git.js:12:31
at Object.q.process [as _onImmediate] (/usr/local/lib/node_modules/ungit/node_modules/async/lib/async.js:728:21)
at processImmediate [as _immediateCallback] (timers.js:330:15)
info: socket.io started
info: Listening on port 8448
## Ungit started ##
It occours (maybe not exclusively and definitely not always) right after I klick on a changed file to view the differences. On my fifth try everything worked like expected.
Not a problem for me anymore, but maybe it helps you fix the bug.
It seems Mac OSX limits file descriptors to 256 as stated by amadanmath you can get around this issues by increasing the limit by issuing this command in terminal "ulimit -n 1024" with out the quotes of course. This is of course just a quick fix to the problem and not a solution. If you decide to change OSX limit for testing purposes I would recommend setting them back to 256 once your done testing.
OS X default for the file descriptor
ulimit
is 256 (which is really, really low). So I'm running out of file descriptors pretty much if I as much as scroll the screen once.It mostly happens at
git.js
, from holding input and output descriptors tochild_process
. I suppose it would help if you could wrap the git spawning in anasync.queue
, in order to keep the simultaneous execution down.