# Newman - Heap Memory Error

**URL:** <https://community.postman.com/t/newman-heap-memory-error/10260>\
**Category:** Help Hub\
**Tags:** newman-project\
**Created:** [January 22, 2020, 9:55am UTC](https://community.postman.com/t/newman-heap-memory-error/10260 "2020-01-22T09:55:06Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![l.ruggeri](https://avatars.discourse-cdn.com/v4/letter/l/ccd318/32.png) [@l.ruggeri](https://community.postman.com/u/l.ruggeri)\
**Post date:** [January 22, 2020, 9:55am UTC](https://community.postman.com/t/newman-heap-memory-error/10260/1 "2020-01-22T09:55:06Z")

</div>

> **Archived topic — this may be out of date.**  
> Newman has been replaced by the **[Postman CLI](https://learning.postman.com/docs/postman-cli/postman-cli-overview/)**, Postman’s official, signed command-line tool. It runs collections as Newman did, and also lints API specs, runs mocks and monitors, and syncs local files with Postman from your terminal, CI/CD pipeline or coding agent.  
> Working with an AI coding agent? The [Postman plugin](https://github.com/postmanlabs/postman-plugin) lets agents in Claude Code, Cursor, Codex and others design, mock, test and ship APIs with Postman.  
> For current help, see the [Postman docs](https://learning.postman.com/docs/), try the free [Postman tools](https://www.postman.com/tools) (no account needed), or join us on [Discord](https://discord.gg/58aNNsRBGR).

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 🙂

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:🏭: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

---

<div class="post-metadata">

**Author:** ![miroslawmajkasr](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/miroslawmajkasr/32/3984_2.png) [@miroslawmajkasr](https://community.postman.com/u/miroslawmajkasr)\
**Post date:** [March 10, 2020, 11:19am UTC](https://community.postman.com/t/newman-heap-memory-error/10260/2 "2020-03-10T11:19:58Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![svarshney2311](https://avatars.discourse-cdn.com/v4/letter/s/e36b37/32.png) [@svarshney2311](https://community.postman.com/u/svarshney2311)\
**Post date:** [June 30, 2020, 1:39am UTC](https://community.postman.com/t/newman-heap-memory-error/10260/3 "2020-06-30T01:39:40Z")

</div>

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:🏭: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

---

<div class="post-metadata">

**Author:** ![raul.j.ruiz](https://avatars.discourse-cdn.com/v4/letter/r/ec9cab/32.png) [@raul.j.ruiz](https://community.postman.com/u/raul.j.ruiz)\
**Post date:** [October 15, 2020, 2:09pm UTC](https://community.postman.com/t/newman-heap-memory-error/10260/4 "2020-10-15T14:09:56Z")

</div>

Same issue here, with 50 iterations. I have also tried to increase memory allocated as indicated on some nodejs blogs with no result. Any idea?

---

<div class="post-metadata">

**Author:** ![ericrommel](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/ericrommel/32/3523_2.png) [@ericrommel](https://community.postman.com/u/ericrommel)\
**Post date:** [January 28, 2021, 6:06pm UTC](https://community.postman.com/t/newman-heap-memory-error/10260/5 "2021-01-28T18:06:15Z")

</div>

Same here… no parallel execution, but looping among the requests at the same collection:

```
<--- Last few GCs --->
[25170:0x283ea10] 8913477 ms: Scavenge 5627.1 (6253.1) -> 5612.0 (6253.1) MB, 25.8 / 0.0 ms (average mu = 0.399, current mu = 0.415) allocation failure
[25170:0x283ea10] 8913851 ms: Scavenge 5631.5 (6257.1) -> 5616.4 (6257.1) MB, 27.7 / 0.0 ms (average mu = 0.399, current mu = 0.415) allocation failure
[25170:0x283ea10] 8914149 ms: Scavenge 5635.8 (6261.2) -> 5620.8 (6261.2) MB, 30.9 / 0.0 ms (average mu = 0.399, current mu = 0.415) allocation failure
<--- JS stacktrace --->
==== JS stack trace =========================================
0: ExitFrame [pc: 0x1aa48efdbe1d]
1: StubFrame [pc: 0x1aa48efdd4b8]
Security context: 0x0ae367c1e6c1 <JSObject>
2: parse [0x87c1f6cbaa1] [/home/ubuntu/.nvm/versions/node/v10.20.1/lib/node_modules/newman/node_modules/psl/index.js:~141] [pc=0x1aa49009570f](this=0x0ad722185c19 <Object map = 0xcae327d7ad1>,input=0x377b137bf321 <String[26]: api.load-test.creditor.dev>)
3: onStart [0x377b137bf251] [/home/ubuntu/.nvm/versions/nod...
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
```

---

<div class="post-metadata">

**Author:** ![this.is.me](https://avatars.discourse-cdn.com/v4/letter/t/e19b73/32.png) [@this.is.me](https://community.postman.com/u/this.is.me)\
**Post date:** [February 11, 2021, 10:32pm UTC](https://community.postman.com/t/newman-heap-memory-error/10260/6 "2021-02-11T22:32:02Z")

</div>

I experience the same error, although I reach 155th iteration and then the error crashes the run.  
My test couldn’t be more simple: it loops through 604 json array members and verifies one number in each member.
