-
-
Notifications
You must be signed in to change notification settings - Fork 148
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
Memory leak when required repeatedly #102
Comments
This is still a problem |
Yeah! This is still a problem. @isaacs can you please respond to people? |
any changes to add more maintainers to fix this problem? |
Still a problem for us as well (using Jest and |
great work! waiting for it to be released and included in Jest, etc. |
It has been released, and is within semver range in jest. So you should be able to upgrade on your side (although a PR to explicitly bump it in Jest is welcome) |
Unfortunately this does not fix the issues. Jest tests, although using graceful.js in version 4.1.15, quit working with memory heap errors. The RAM consumption increases with every new test. Anything one can do to drop graceful.js on PC entirely? |
graceful-fs and jest does not like each other, so this removes the graceful-fs implementation before running tests and adds it back afterwards. jestjs/jest#6399 jestjs/jest#6814 isaacs/node-graceful-fs#102
(This has been my first effort at debugging a memory leak, so if you have any advice on how I can do this better or be more helpful, please let me know!)
I think I've run into a memory leak in this module. Here's the short backstory: I work on a project, stylelint, that has a lot of tests. We end up running >20K assertions across hundreds of test files. We've been experimenting with the test runner Jest, but it always crashes on Node 4. I logged heap statistics and with each test file saw the heap growing, with inadequate cleanup, until the crash. Through some trial-and-error experiments, I think I tracked this behavior down to a dependency, cosmiconfig, that uses this module. When I change cosmiconfig's usage of
graceful-fs
to Node'sfs
, stylelint's memory problem goes away: the garbage collection adequately reduces memory usage when the heap has grown too much.I'm not sure what the next steps would be for diagnosing this, but I can try to help if anybody has any suggestions.
The text was updated successfully, but these errors were encountered: