-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENFILE: file table overflow with Karma #1979
Comments
This issue is getting serious as more people are reporting it and we have no idea how it happened. [08:44:36] 'karma' errored after 2.48 s [08:44:36] Error: ENFILE: file table overflow, scandir '/Users/Abhi/Documents/projects/test/src/app' at Error (native) at Object.fs.readdirSync (fs.js:808:18) at GlobSync._readdir (/Users/Abhi/Documents/projects/test/node_modules/karma/node_modules/glob/sync.js:275:41) at GlobSync._processGlobStar (/Users/Abhi/Documents/projects/test/node_modules/karma/node_modules/glob/sync.js:330:22) at GlobSync._process (/Users/Abhi/Documents/projects/test/node_modules/karma/node_modules/glob/sync.js:128:10) at new GlobSync (/Users/Abhi/Documents/projects/test/node_modules/karma/node_modules/glob/sync.js:46:10) at new Glob (/Users/Abhi/Documents/projects/test/node_modules/karma/node_modules/glob/glob.js:111:12) at /Users/Abhi/Documents/projects/test/node_modules/karma/lib/file-list.js:161:14 at Array.map (native) at [object Object].List._refresh (/Users/Abhi/Documents/projects/test/node_modules/karma/lib/file-list.js:153:37) at [object Object].List.refresh (/Users/Abhi/Documents/projects/test/node_modules/karma/lib/file-list.js:252:27) at [object Object].Server._start (/Users/Abhi/Documents/projects/test/node_modules/karma/lib/server.js:177:12) at [object Object].invoke (/Users/Abhi/Documents/projects/test/node_modules/karma/node_modules/di/lib/injector.js:75:15) at [object Object].Server.start (/Users/Abhi/Documents/projects/test/node_modules/karma/lib/server.js:101:18) at Gulp. (/Users/Abhi/Documents/projects/test/gulp/tasks/test-unit.js:53:12) at module.exports (/Users/Abhi/Documents/projects/test/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:34:7) at Gulp.Orchestrator._runTask (/Users/Abhi/Documents/projects/test/node_modules/gulp/node_modules/orchestrator/index.js:273:3) at Gulp.Orchestrator._runStep (/Users/Abhi/Documents/projects/test/node_modules/gulp/node_modules/orchestrator/index.js:214:10) at Gulp.Orchestrator.start (/Users/Abhi/Documents/projects/test/node_modules/gulp/node_modules/orchestrator/index.js:134:8) at /Users/Abhi/Documents/projects/test/node_modules/gulp/bin/gulp.js:129:20 at nextTickCallbackWith0Args (node.js:419:9) at process._tickCallback (node.js:348:13) |
I don't think this is an issue with karma directly, it might be an issue with node-glob (which is known to be quirky on windows). The problem is I as long as I don't have a way to reproduce this I'm not sure what to do. |
Thanks. Just FYI ... I am running on Mac OS X El Capitan |
Oh sorry, yes you are right, not sure why I thought it was Windows related... From the looks it might be sth tod with the jspm plugin. Have you tried removing it/different versions? |
I tried updating JSPM doesn't work, was getting npm deprecation warning in console for graceful-fs if that is relevant. npm install jspm |
Hey Guys, As Abhi will know, i too found myself in the same boat today, oddly, the only one in my team we found it hard to spot the cause, but can confirm that the globbing was indeed spurning the error message and annoyingly didn't seem to have anything to do with open file limits (walked that path for a while sigh). Stack answer i shared with Abhi here In the end the main cause seemed to be if i used a glob pattern in the karma.config which contained a double asterisk (*/) in a folder that went further than a second level deep. Then managed to replicate the error by using the node-glob directly, to generate the same error. In the end, using the glob.sync route, and building the URL array myself worked around the issue. Hopefully this gives the author a clue into what he can do to fix. Cheers |
+1 After upgrading to ng2 beta 11, I'm too getting these errors. { [Error: ENFILE: file table overflow, scandir '/Users/git_repo/src/app'] |
I have them on beta 9 (Yosemite) |
This should help: |
Any news on this? |
Any news on this issue? I have the same error. For information, I use MacOS 10.11.4. |
Run these in terminal:
Add this to ~/.bash_profile
That's it. Source: http://blog.mact.me/2014/10/22/yosemite-upgrade-changes-open-file-limit |
Getting this on ubuntu linux 16.04 as well,
Pre-globbing the files worked, but ulimit changes didn't. |
Desactivate the cache for karma solved this issue ( |
|
Cross-posting this here because it might help others, here's a solution to this issue by @abernix: https://gist.github.com/abernix/a7619b07b687bb97ab573b0dc30928a0 |
@elie222 saved me |
I have got a reproducible example for this issue, wanna see? |
Thanks! Worked for me. |
Hi Guys,
I am facing file table overflow issue while running the karma tests please help?
Details are mentioned here.
http://stackoverflow.com/questions/35873437/enfile-file-table-overflow-with-karma
Thanks,
Abhi
The text was updated successfully, but these errors were encountered: