Open VPetrovAkveo opened 1 year ago
since you are running a self-hosted agent (/home/ubuntu/myagent/externals/node16/bin/node) one possible solution is to pass the corresponding memory related parameter either as environment variable or as direct option to the node process to control the available memory of your node runtime. Some links which might help you
https://nodejs.org/api/cli.html#--max-old-space-sizesize-in-megabytes
https://nodejs.org/api/cli.html#node_optionsoptions
This is not working for me on a linux self-hosted agent. Is there a better way to resolve?
I often get this error when publishing a report. Can you help with this?
<--- Last few GCs --->
[2383881:0x595a7b0] 156487 ms: Mark-sweep 4050.3 (4139.8) -> 4049.9 (4139.8) MB, 2525.6 / 0.0 ms (average mu = 0.218, current mu = 0.101) allocation failure scavenge might not succeed [2383881:0x595a7b0] 160869 ms: Mark-sweep 4065.6 (4139.8) -> 4065.4 (4170.8) MB, 4350.6 / 0.0 ms (average mu = 0.109, current mu = 0.007) allocation failure scavenge might not succeed
<--- JS stacktrace --->
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory 1: 0xb09c10 node::Abort() [/home/ubuntu/myagent/externals/node16/bin/node] 2: 0xa1c193 node::FatalError(char const, char const) [/home/ubuntu/myagent/externals/node16/bin/node] 3: 0xcf8dde v8::Utils::ReportOOMFailure(v8::internal::Isolate, char const, bool) [/home/ubuntu/myagent/externals/node16/bin/node] 4: 0xcf9157 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate, char const, bool) [/home/ubuntu/myagent/externals/node16/bin/node] 5: 0xeb09f5 [/home/ubuntu/myagent/externals/node16/bin/node] 6: 0xec06bd v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/home/ubuntu/myagent/externals/node16/bin/node] 7: 0xec33be v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/home/ubuntu/myagent/externals/node16/bin/node] 8: 0xe848fa v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType, v8::internal::AllocationOrigin) [/home/ubuntu/myagent/externals/node16/bin/node] 9: 0x11fd646 v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long, v8::internal::Isolate) [/home/ubuntu/myagent/externals/node16/bin/node] 10: 0x15f20b9 [/home/ubuntu/myagent/externals/node16/bin/node]