Newman - Heap Memory Error

Hello,
We have the below case :
1 - Create a collection on postman using Pre-Request Script and Tests scripts .
2 - Export the collection
3 - use the below command line to run the collection for 100 iteration :slight_smile:

newman run C:\temp\004_L10_Orchestrator_L10_UAT_V4.0.postman_collection.json -g C:\temp\Euro_globals.json -e C:\temp\UAT-L10-WagerOperations.postman_environment.json --folder β€œ5104 - Tzoker (Channel 2)” -k -n 100

after 50 iteration the run crash with a nodejs Heap Memory Error .

How we can fix it ?

This is not a performance test because each iteration have different data

<β€” Last few GCs β€”>

[10028:000001BE90168DD0] 355619 ms: Scavenge 2042.2 (2049.5) -> 2041.1 (2049.5) MB, 4.4 / 0.0 ms (average mu = 0.234, current mu = 0.129) allocation failure
[10028:000001BE90168DD0] 355636 ms: Scavenge 2042.7 (2049.7) -> 2041.9 (2050.7) MB, 5.8 / 0.0 ms (average mu = 0.234, current mu = 0.129) allocation failure
[10028:000001BE90168DD0] 355660 ms: Scavenge 2044.7 (2052.0) -> 2043.9 (2056.1) MB, 5.7 / 0.0 ms (average mu = 0.234, current mu = 0.129) allocation failure

<β€” JS stacktrace β€”>

==== JS stack trace =========================================

0: ExitFrame [pc: 00007FF788EA154D]
1: StubFrame [pc: 00007FF788F11F49]

Security context: 0x00d1dc3c0921
2: baseClone [0000008D72BE2A39] [C:\Users\Agent\AppData\Roaming\npm\node_modules\newman\node_modules\lodash\lodash.js:1] [bytecode=000001855E0FE891 offset=0](this=0x0098e94c2531 ,0x011436a82d41 <String[#7]: integer>,5,0x0110437ab189 <JSFunction (sfi = 00000150CA97CAB1)>,0x011436a83259 <String[#4]…

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory

Writing Node.js report to file: report.20200122.122008.10028.0.001.json
Node.js report completed
1: 00007FF788290BEF napi_wrap+126287
2: 00007FF78822DF26 public: bool __cdecl v8::base::CPU::has_sse(void)const __ptr64+34950
3: 00007FF78822EBF6 public: bool __cdecl v8::base::CPU::has_sse(void)const __ptr64+38230
4: 00007FF788A57FEE private: void __cdecl v8::Isolate::ReportExternalAllocationLimitReached(void) __ptr64+94
5: 00007FF788A3F741 public: void __cdecl v8::SharedArrayBuffer::Externalize(class std::shared_ptr const & __ptr64) __ptr64+785
6: 00007FF7889067AC public: static void __cdecl v8::internal::Heap::EphemeronKeyWriteBarrierFromCode(unsigned __int64,unsigned __int64,class v8::internal::Isolate * __ptr64)+1468
7: 00007FF788911AF0 public: void __cdecl v8::internal::Heap::ProtectUnprotectedMemoryChunks(void) __ptr64+1312
8: 00007FF78890E5E4 public: static bool __cdecl v8::internal::Heap::PageFlagsAreConsistent(class v8::internal::HeapObject)+3188
9: 00007FF788903CF3 public: bool __cdecl v8::internal::Heap::CollectGarbage(enum v8::internal::AllocationSpace,enum v8::internal::GarbageCollectionReason,enum v8::GCCallbackFlags) __ptr64+1283
10: 00007FF788902484 public: void * __ptr64 __cdecl v8::internal::Heap::AllocateExternalBackingStore(class std::function<void * __ptr64 __cdecl(unsigned __int64)> const & __ptr64,unsigned __int64) __ptr64+1396
11: 00007FF788924554 public: class v8::internal::Handle __cdecl v8::internal::factory::NewFillerObject(int,bool,enum v8::internal::AllocationType,enum v8::internal::AllocationOrigin) __ptr64+196
12: 00007FF78867E841 ??4iterator@JumpTableTargetOffsets@interpreter@internal@v8@@QEAAAEAV01234@$$QEAV01234@@Z+1681
13: 00007FF788EA154D public: virtual bool __cdecl v8::internal::SetupIsolateDelegate::SetupHeap(class v8::internal::Heap * __ptr64) __ptr64+517453
14: 00007FF788F11F49 public: virtual bool __cdecl v8::internal::SetupIsolateDelegate::SetupHeap(class v8::internal::Heap * __ptr64) __ptr64+978761
15: 00007FF788E2CE6B public: virtual bool __cdecl v8::internal::SetupIsolateDelegate::SetupHeap(class v8::internal::Heap * __ptr64) __ptr64+40555
16: 00007FF788E2CE6B public: virtual bool __cdecl v8::internal::SetupIsolateDelegate::SetupHeap(class v8::internal::Heap * __ptr64) __ptr64+40555
17: 00007FF788E26A69 public: virtual bool __cdecl v8::internal::SetupIsolateDelegate::SetupHeap(class v8::internal::Heap * __ptr64) __ptr64+14953
18: 000003F9E5B1B13E

1 Like

I can confirm this when trying 200 parallel newman runs from one script.

I am also getting same type of error. Is the issue resolved. Could anyone please provide the solution for this. Here is my Newman command.

newman run Digital_API.postman_collection.json -r htmlextra --reporter-htmlextra-title β€œDigital API Automation report” -d TestData_SIT.json

Here is a error:

<β€” Last few GCs β€”>

[28152:000002D62F1A7200] 4378103 ms: Mark-sweep 2036.9 (2055.4) -> 2032.8 (2055.1) MB, 1328.3 / 0.0 ms (average mu = 0.387, current mu = 0.484) allocation failure scavenge might not succeed
[28152:000002D62F1A7200] 4380001 ms: Mark-sweep 2036.6 (2055.1) -> 2032.8 (2054.9) MB, 1684.9 / 0.0 ms (average mu = 0.253, current mu = 0.113) allocation failure scavenge might not succeed

<β€” JS stacktrace β€”>

==== JS stack trace =========================================

0: ExitFrame [pc: 00007FF7202577DD]
1: StubFrame [pc: 00007FF7202C035E]

Security context: 0x01bff81408d1
2: /* anonymous */ [0000003AC8CB78D9] [evalmachine.:13784] [bytecode=0000031353F12CA1 offset=0](this=0x033a74703c29 ,0x01bff817c1d1 <String[#3]: key>)
3: arguments adaptor frame: 3->1
4: Ht [0000004D77A92F89] [evalmachine.:~13784] [pc=0000031C6ECBD37A](this=0x033a747…

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 00007FF71F64470F napi_wrap+113583
2: 00007FF71F5EF7D6 v8::base::CPU::has_sse+66646
3: 00007FF71F5F05D6 v8::base::CPU::has_sse+70230
4: 00007FF71FE042EE v8::Isolate::ReportExternalAllocationLimitReached+94
5: 00007FF71FDEC3C1 v8::SharedArrayBuffer::Externalize+833
6: 00007FF71FCB890C v8::internal::Heap::EphemeronKeyWriteBarrierFromCode+1436
7: 00007FF71FCC3B40 v8::internal::Heap::ProtectUnprotectedMemoryChunks+1312
8: 00007FF71FCC0664 v8::internal::Heap::PageFlagsAreConsistent+3204
9: 00007FF71FCB5E63 v8::internal::Heap::CollectGarbage+1283
10: 00007FF71FCB44D4 v8::internal::Heap::AddRetainedMap+2452
11: 00007FF71FCD56DD v8::internal::factory::NewFillerObject+61
12: 00007FF71FA3BF61 v8::internal::interpreter::JumpTableTargetOffsets::iterator::operator=+1665
13: 00007FF7202577DD v8::internal::SetupIsolateDelegate::SetupHeap+546637
14: 00007FF7202C035E v8::internal::SetupIsolateDelegate::SetupHeap+975566
15: 00007FF7201DC78C v8::internal::SetupIsolateDelegate::SetupHeap+42748
16: 00007FF7201D5ABC v8::internal::SetupIsolateDelegate::SetupHeap+14892
17: 0000031C6ECBD37A