Skip to content
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

Look into jest memory issues #1496

Closed
joachimvh opened this issue Nov 2, 2022 · 2 comments
Closed

Look into jest memory issues #1496

joachimvh opened this issue Nov 2, 2022 · 2 comments
Labels

Comments

@joachimvh
Copy link
Member

joachimvh commented Nov 2, 2022

The PRs #1468 and #1481 had some issues with the CI failing because of memory allocation errors FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory. Looking into it, it seems there are some known issues with jest related to this:

I did some comparisons with different solutions using --runInBand --logHeapUsage but none of the changes had any clear impact. Some issues also mention that there are problems with --runInBand so could also be related to that. In the end I disabled coverage for integration tests and added the main suggestions from the linked PRs (which is adding the --expose-gc --no-compilation-cache node flags) in 80fa81a, which seems to have resolved the issue.

This issue is mostly a reminder to perhaps look more extensively into this in the future, and also in case this issue should occur again.

@joachimvh
Copy link
Member Author

I additionally had to increase the integration test timeout to 20 minutes as 15 minutes was no longer sufficient.

I wonder if we can somehow split our set of integration tests into several different actions. That way they would be resolved faster, allowing more of them to be done in parallel, and would also reduce the memory consumption issue as that is scoped per action.

@joachimvh
Copy link
Member Author

Jest 29 introduced additional options to prevent this issue which seems to have resolved everything. See the changes in 7a4170a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant