-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
jest-worker farm memory leak #11633
Comments
@IIIEII can you send a pull request to fix this? can you provide a patch-package (https://github.com/ds300/patch-package) so more people can try your solution? |
Very much happy to take a PR changing this like suggested |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Parent process continuously grow memory usage while executing multiple child worker processes that return large chunks of data.
I prepared sample repository to reproduce issue: https://github.com/IIIEII/jest-worker-farm-leak
It has worker that returns large array with strings.
Parent process executes it three times with pause of 10s between.
Steps:
node --inspect --expose-gc src/parent.js
3. Here you can see that data returned from worker are stored in memory
It seems that problem lies here: https://github.com/facebook/jest/blob/7a64ede2163eba4ecc725f448cd92102cd8c14aa/packages/jest-worker/src/Farm.ts#L136-L138
Possible solution:
node_modules/jest-worker/build/Farm.js
file:node --inspect --expose-gc src/parent.js
4. Here you can see that data are in GC roots
The text was updated successfully, but these errors were encountered: