Frequently hitting the memory limit when running frontend tests
See original GitHub issueWhen running the frontend tests, I get the following error quite frequently:
ℹ 「wdm」: Compiled with warnings.
<--- Last few GCs --->
[9224:0x4c3aa40] 101593 ms: Scavenge 1748.0 (1837.9) -> 1736.8 (1837.7) MB, 5.6 / 0.1 ms (average mu = 0.923, current mu = 0.901) allocation failure
[9224:0x4c3aa40] 101629 ms: Scavenge 1750.1 (1837.7) -> 1737.7 (1838.0) MB, 4.6 / 0.1 ms (average mu = 0.923, current mu = 0.901) allocation failure
[9224:0x4c3aa40] 101672 ms: Scavenge 1752.6 (1838.0) -> 1738.7 (1838.0) MB, 3.4 / 0.2 ms (average mu = 0.923, current mu = 0.901) allocation failure
<--- JS stacktrace --->
FATAL ERROR: MarkCompactCollector: young object promotion failed Allocation failed - JavaScript heap out of memory
1: 0xa03530 node::Abort() [node]
2: 0x94e471 node::FatalError(char const*, char const*) [node]
3: 0xb7773e v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]
4: 0xb77ab7 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]
5: 0xd32345 [node]
6: 0xd62ede v8::internal::EvacuateNewSpaceVisitor::Visit(v8::internal::HeapObject, int) [node]
7: 0xd6ef16 v8::internal::FullEvacuator::RawEvacuatePage(v8::internal::MemoryChunk*, long*) [node]
8: 0xd5b0ff v8::internal::Evacuator::EvacuatePage(v8::internal::MemoryChunk*) [node]
9: 0xd5b378 v8::internal::PageEvacuationTask::RunInParallel(v8::internal::ItemParallelJob::Task::Runner) [node]
10: 0xd4dc59 v8::internal::ItemParallelJob::Run() [node]
11: 0xd70e70 void v8::internal::MarkCompactCollectorBase::CreateAndExecuteEvacuationTasks<v8::internal::FullEvacuator, v8::internal::MarkCompactCollector>(v8::internal::MarkCompactCollector*, v8::internal::ItemParallelJob*, v8::internal::MigrationObserver*, long) [node]
12: 0xd7170c v8::internal::MarkCompactCollector::EvacuatePagesInParallel() [node]
13: 0xd718d5 v8::internal::MarkCompactCollector::Evacuate() [node]
14: 0xd838c1 v8::internal::MarkCompactCollector::CollectGarbage() [node]
15: 0xd3fbe8 v8::internal::Heap::MarkCompact() [node]
16: 0xd416d8 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
17: 0xd44b1c v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
18: 0xd131fb v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType, v8::internal::AllocationOrigin) [node]
19: 0x105919f v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [node]
20: 0x13ff179 [node]
Done!
The frontend tests failed. Please fix it before running the test coverage check.
Machine specs: RAM: 8 GB Processor: Intel Core i5 CPU @ 1.60GHz × 8
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Memory usage of node process for ng test/serve is very high
I've got ng serve running locally in the background and haven't touched the frontend for at least an hour, just left it idle....
Read more >Container 'Build' exceeded memory limit npm test
The workaround is to limit the memory usage of your process using --max-old-space-size below the 7GB limit or reduce the amount of node...
Read more >Node.js heap out of memory - javascript - Stack Overflow
If I remember correctly, there is a strict standard limit for the memory usage in V8 of around 1.7 GB, if you do...
Read more >Dealing with Large Memory Requirements on Android
The most probable cause for hitting the stack limit is either infinite recursion or an excessively deep method call. Stack memory is always...
Read more >How to Resolve the WordPress Memory Limit Error (2 Methods)
Option 1: Increase the PHP Memory Allocated to Your Website ... It may seem simple, but sometimes the obvious solution is the best...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We can change the workflow to solve this, how does this look? - https://github.com/ScaCap/action-surefire-report/issues/17#issuecomment-677015255
Closing due to inactivity and since we don’t see this on CI anymore. Feel free to reopen if it still happens