Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
Describe the bug When running lighthouse-ci tests occasionally getting the error
Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory.
I have looked at a previously filed issue in lighthouse https://github.com/GoogleChrome/lighthouse/issues/11453 It mentions that if I am running multiple lighthouse tests I should be using a child process. Does lighthouse-ci use child processes to run multiple tests?
To Reproduce Steps to reproduce the behavior:
- Set up a lighthouserc.js config, and set the number of runs to 3
- run website server
- Run command lhci autorun from node_modules/@lhci/cli/src/cli.js
- See Error
Expected behavior No memory leaks to occur
Logs/Screenshots If applicable, add LHCI logs or screenshots to help explain your problem.
Environment (please complete the following information):
- OS: [iOS]
- Browser [Chrome]
- Version [88]
Additional context
Thanks for filing @jimbyo! This isn't enough to reproduce the issue though :/ We have many uses of LHCI that run Lighthouse hundreds of times without an OOM.
Does lighthouse-ci use child processes to run multiple tests?
Yes every run is already in a separate child process.
If you're able to provide a reliable reproduction of a memory leak, we'd be happy to fix it.