-
Notifications
You must be signed in to change notification settings - Fork 50
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
EMFILE, too many open files #97
Comments
Actually I believe is not a bug at all. To test, you can change it running the command: You can add it at your .profile or config in the /etc/security/limits.conf (at least in linux): For all users, add these lines:
Only for your user (valotas), add these lines:
Hope it help. |
Yes, this is an issue with the size of your project/number of dependencies it is using and your OS settings as @lgvo has explained. StackOverflow backs this up. Thanks for the in-depth explanation! |
I am having the exact same thing happen on windows 8.1. My karma was working just fine until I upgraded to node 4.1.1 (previously was node 0.latest). Now its telling me too many open files. |
I'm having the same issue too, on Windows 10 and node 4.1.1 and I don't know how to fix it? |
We're having a similar issue, but we can't explain it: Our dev-team uses only windows 7 laptops, and our project is somewhat big (around 1500-2000 js files that get loaded). That should be no problem, and wasn't up till now. One of my co-workers got a new laptop to replace his old, weak one, with a new, very strong one. The new and pretty strong one has windows 7 64bit system as well, but much stronger hardware, but gets this EMFILE error. All other, even the old dev machines don't get this error. At our dev machines phantomjs keeps crushing, but that's another "problem". On our build servers (pretty weak Linux machines, but they a build process + testing may take some more minutes, don't care) everything works fine: karma, phantomjs, everything. So there is only ONE computer, the most powerful, that has the "EMFILE" error, but all other, with the same windows 7 64bit system, don't have this problem. We use nodejs version 4.1.1 on all tested systems (now), but the different behaviour stays the same. |
@lgvo what do you think? Seems like this is a common issue on windows now, so it can't really be tied to what you cited. |
@togakangaroo I do think it is just the same kind of issue. I also didn't upgrade my projects to node 4, some backend libs aren't working properly when I tried. But I'm using the lastest iojs 3.x without any problems. You can try use iojs too, it have almost the same features that the node 4. |
@lgvo hmm, I have noticed zero issues with any other library. I need to upgrade since jspm bundle needs a newer version of node to properly bundle es6 features for production (ie I hate the idea of transforming generators, arrow functions, and const when the latest browsers already support them). Io.js is a non-starter since, not only is it a step backwards, but it would affect all other developers on my project, and all other projects using the same build server. It is strange though, I've got another small project that has very few dependencies where this is still happening. Is there anything in karma-jspm that you know of that might cause this? Seems like I might have to spend some time setting up a small issue repro. We can discuss then. |
@togakangaroo if it' s only karma-jspm it must be related to the glob dependency I think, try to use karma-jspm locally (using npm link) and update the glob library and see if it helps. About transpiling ES6 features you can watch the https://github.com/getify/es-feature-tests We are talking about that on getify/ES-Feature-Tests#9. But if you have to support more browser I don't think you can get a production solution on that maybe use the browser support only for your workflow. For backend I create some scripts that work, maybe if I get some time I make a pull request on that. |
Just in case: We don't use karma-jspm, we use tried plain karma and grunt-karma as runners. We have some setup with requirejs, but currently I'm not at work, so I can't tell the exact setup, but it's pretty much like here: https://karma-runner.github.io/0.8/plus/RequireJS.html |
Hey. I have the same problem here. EMFILE errors with karma/karma-jspm since I switched to nodejs 4.x |
Just to update everyone... I replicated this in a simple project with just karma, jspm, karma-jspm, and a single test. However, when I upgraded everything to latest, dumped node_modules and re-installed everything started working. Still investigating whether I can get my actual project back to running. |
Looks like that since 4.0.5 glob has support to use graceful-fs Issue. |
Same issue :-/ |
I have same issue since upgraded to node v5 |
Same issue, but that can't be the solution to edit a system file... When will this be fixed? |
I get the same issue on Windows 8.1. I believe karama tries to "eat" all files at once and it hits system limit, therefore I believe it's an actual bug. Has aynone tried global patching it? Some more info. I believe problem may be due karma serving node_modules. I ran few commands through cygwin:
(Client is where my code and jspm_packages sit) |
I also believe that karma tries to "eat" all the files at once. It can be a general karma problem as angular has the same problem |
+1 I'm trying to get the tests in https://github.com/AngularClass/NG6-starter/tree/jspm to work.
My package.json:
The error I have:
|
Take a look @ #115 |
Updating karma (old version: 0.12.36, new version: 0.13.19) fixes the EMFILE issue, at least for me. Reason, I think, because the newer version uses As a side note, I think that karma's preprocessor should act more clever. It should not send unlimited files at the same time to the preprocessor, but rather implement a smart solution. Ie. define a reasonable limit for parallel running. |
Issue with jspm_packages fixed in pull request 126 #126 |
Same thing here, I'm in Windows 10, with karma 0.12.x I had the EMFILE issue, and after updating to 0.13.19, it was solved |
I'm having the same issue. I've read that karma-jspm@2.0.3 supposedly fixes this, or at least allows you to set noPackagesCache:true in karma.config, which doesn't work for me. I also see that the latest version is karma-jspm@2.1.0, but neither of these are available in npm. The latest valid install target is 2.0.2. How long does it usually take for npm to sync up with github? I'm having the same problem with a project at work, so I created a project to try and figure it out. For the time being, I've had to stop using karma and just run mocha straight from npm (project). But I would much rather use karma if at all possible. |
@balazsmeszegeto |
It's still happening for us with Karma 0.13.22 and karma-jspm 2.1.0 (observed on Mac & Linux) |
same here. windows 10. karma 0.13.22 running through gulp. Only when trying 5 karma instances simultaneously. 4 simultaneous instances pass tests fine. |
I have the same issue :( karma 0.13.22 and karma-jspm 2.1.0 |
Windows Server 2012 R2 ~ Same issue. Someone please find a solution for this error.
Thanks. |
I was having the same issue on Ubuntu 14.04. Tried the recommended methods above with no luck. What ended up fixing the issue for me was deleting my jspm_packages folder and then running jspm install again. After this, my tests now run without the error. |
I've got the same issue. My stack trace:
What I found out: files === [ '/home/sven/dev/projects/angular2-setup-poc/jspm_packages/system.src.js',
'/home/sven/dev/projects/angular2-setup-poc/jspm_packages/system-polyfills.src.js',
'/home/sven/dev/projects/angular2-setup-poc/node_modules/karma-jspm/src/adapter.js',
'/home/sven/dev/projects/angular2-setup-poc/jspm.test.js',
'/home/sven/dev/projects/angular2-setup-poc/jspm.config.js',
'/home/sven/dev/projects/angular2-setup-poc/jspm_packages/**/*',
'/home/sven/dev/projects/angular2-setup-poc/src/app/todos/*.spec.ts',
'/home/sven/dev/projects/angular2-setup-poc/src/**/*.ts' ] I get files === [ '/home/sven/dev/projects/angular2-setup-poc/jspm_packages/system.src.js',
'/home/sven/dev/projects/angular2-setup-poc/jspm_packages/system-polyfills.src.js',
'/home/sven/dev/projects/angular2-setup-poc/node_modules/karma-jspm/src/adapter.js',
'/home/sven/dev/projects/angular2-setup-poc/jspm.test.js',
'/home/sven/dev/projects/angular2-setup-poc/jspm.config.js',
'/home/sven/dev/projects/angular2-setup-poc/src/app/todos/*.spec.ts',
'/home/sven/dev/projects/angular2-setup-poc/src/**/*.ts',
'/home/sven/dev/projects/angular2-setup-poc/jspm_packages/**/*' ] But I have no clue how this could provoke the error. {
"jspm": "^0.17.0-beta.13",
"karma": "^0.13.22",
"karma-jspm": "2.1.0"
} |
Thanks @svi3c ! npm install karma@0.13.22 |
Thanks @svi3c you fixed the karma@0.13.22 |
Fixed in #148 |
I am not sure if it has to do with
karma-jspm
itself orkarma
but I'm getting the followingMy assumption is that karma can not handle the size of
jspm_packages
The text was updated successfully, but these errors were encountered: