# Long run in Newman or Postman runner

**URL:** <https://community.postman.com/t/long-run-in-newman-or-postman-runner/7644>\
**Category:** Help Hub\
**Tags:** newman-project, runner, performance, reporters\
**Created:** [September 6, 2019, 8:45am UTC](https://community.postman.com/t/long-run-in-newman-or-postman-runner/7644 "2019-09-06T08:45:04Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![mkolomanski](https://avatars.discourse-cdn.com/v4/letter/m/9f8e36/32.png) [@mkolomanski](https://community.postman.com/u/mkolomanski)\
**Post date:** [September 6, 2019, 8:45am UTC](https://community.postman.com/t/long-run-in-newman-or-postman-runner/7644/1 "2019-09-06T08:45:04Z")

</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,

I wonder if there is a possibility in Newman or collection runner to run a collection which has for example 1 milon queries?

In a standard approach there isn’t. Node process collects data to an error: “Javascript heap out of memory”.

I really don’t want to store any data for the report it’s useless for me. Only globals variables can be stored. I just want to send queries almost infinitely.

Is there any possibility to run long collection in that environment?  
Thanks for any kind of help.

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [September 6, 2019, 8:50am UTC](https://community.postman.com/t/long-run-in-newman-or-postman-runner/7644/2 "2019-09-06T08:50:45Z")

</div>

Hey @mkolomanski,

Are you able to explain more about the actual use case here - I’m trying to understand the _why_ behind your problem.

What feedback are you looking to get from 1 million, 500K, 100K requests running? Are you testing for a particular _thing_? Are you doing some form of Load or Performance Test? Are you seeding a database with a bunch of data?

---

<div class="post-metadata">

**Author:** ![mkolomanski](https://avatars.discourse-cdn.com/v4/letter/m/9f8e36/32.png) [@mkolomanski](https://community.postman.com/u/mkolomanski)\
**Post date:** [September 6, 2019, 8:58am UTC](https://community.postman.com/t/long-run-in-newman-or-postman-runner/7644/3 "2019-09-06T08:58:46Z")

</div>

Hello @danny-dainton,

I fill my database with objects, events, trends etc.  
In my collection I have 20 queries but I jump to them plenty of times. Lets say that I jump to the query which creates an event 1 milion times.

I would be delighted if there will be an option to not store any data for the report and just keep sending an infinite number of queries (Memory occupation by node process doesnt increase).

---

<div class="post-metadata">

**Author:** ![vdespa](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/vdespa/32/2770_2.png) [@vdespa](https://community.postman.com/u/vdespa)\
**Post date:** [September 6, 2019, 7:07pm UTC](https://community.postman.com/t/long-run-in-newman-or-postman-runner/7644/4 "2019-09-06T19:07:43Z")

</div>

Node only allocates around ~1.5 GB of memory, and Newman uses all of it, so it crashes.

You can run Newman as la Node.js library and do something like:

`node --max-old-space-size=8192 newman.js #increase to 8gb`

But don’t get your hopes up. I had only managed to get ~100000 to run without increasing the memory. You may need a lot of memory to finish 1 million. I had even tried disabling the cli reporter but to no avail.

My first impression is that there is a memory leak somewhere.

---

<div class="post-metadata">

**Author:** ![mkolomanski](https://avatars.discourse-cdn.com/v4/letter/m/9f8e36/32.png) [@mkolomanski](https://community.postman.com/u/mkolomanski)\
**Post date:** [September 9, 2019, 7:55am UTC](https://community.postman.com/t/long-run-in-newman-or-postman-runner/7644/5 "2019-09-09T07:55:29Z")

</div>

Thanks for the tip @vdespa. It’s always something.

I thoroughly explored the subject on the Git and many users have the same problem like me, for example: [Running 100000 iterations of a single POST call seems to break the reporter · Issue #935 · postmanlabs/newman · GitHub](https://github.com/postmanlabs/newman/issues/935)  
That was created 3.03.2017 ☹

Unfortunately, the problem isn’t solved

---

<div class="post-metadata">

**Author:** ![ishan.jain](https://avatars.discourse-cdn.com/v4/letter/i/ad7895/32.png) [@ishan.jain](https://community.postman.com/u/ishan.jain)\
**Post date:** [September 9, 2019, 10:10am UTC](https://community.postman.com/t/long-run-in-newman-or-postman-runner/7644/6 "2019-09-09T10:10:26Z")

</div>

I raised an issue on similar lines a couple of weeks ago - [Newman running in Docker with large number of iterations fails at around 10K requests](https://community.postman.com/t/newman-running-in-docker-with-large-number-of-iterations-fails-at-around-10k-requests/7509)

In my case, i use a collection of 5 requests with 2500 iterations and it fails after about 10K requests. The logs getting generated out of this is about 10 MB (i can see that in Jenkins), so i don’t think logging is an issue here.

---

<div class="post-metadata">

**Author:** ![vdespa](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/vdespa/32/2770_2.png) [@vdespa](https://community.postman.com/u/vdespa)\
**Post date:** [September 10, 2019, 4:04am UTC](https://community.postman.com/t/long-run-in-newman-or-postman-runner/7644/7 "2019-09-10T04:04:32Z")

</div>

The fact that the issue is that old, shows that this use-case is not what the tool is made for.

If I were you, I would just create my own script to generate that amount of requests.

---

<div class="post-metadata">

**Author:** ![mkolomanski](https://avatars.discourse-cdn.com/v4/letter/m/9f8e36/32.png) [@mkolomanski](https://community.postman.com/u/mkolomanski)\
**Post date:** [September 10, 2019, 7:24am UTC](https://community.postman.com/t/long-run-in-newman-or-postman-runner/7644/8 "2019-09-10T07:24:10Z")

</div>

Which language do you recommend for that purpose?

---

<div class="post-metadata">

**Author:** ![ripple.gupta](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/ripple.gupta/32/888_2.png) [@ripple.gupta](https://community.postman.com/u/ripple.gupta)\
**Post date:** [September 11, 2019, 5:59am UTC](https://community.postman.com/t/long-run-in-newman-or-postman-runner/7644/9 "2019-09-11T05:59:12Z")

</div>

try Gatling @mkolomanski

---

<div class="post-metadata">

**Author:** ![vdespa](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/vdespa/32/2770_2.png) [@vdespa](https://community.postman.com/u/vdespa)\
**Post date:** [September 11, 2019, 6:08pm UTC](https://community.postman.com/t/long-run-in-newman-or-postman-runner/7644/10 "2019-09-11T18:08:09Z")

</div>

Since you already have Node.js installed, just use JavaScript for that.

You can easily generate some code from Postman.

---

<div class="post-metadata">

**Author:** ![descent-module-mete2](https://avatars.discourse-cdn.com/v4/letter/d/a9adbd/32.png) [@descent-module-mete2](https://community.postman.com/u/descent-module-mete2)\
**Post date:** [October 28, 2021, 10:29am UTC](https://community.postman.com/t/long-run-in-newman-or-postman-runner/7644/11 "2021-10-28T10:29:18Z")

</div>

Why would newman use 1.5GB? If it stores all the data, it would be nice to have an option to not do that. We do nowhere near that many tests but still get crashes. Another issue is that it’s EXTREMELY SLOW. The request takes a two minutes combined but the test runs for hours.

---

<div class="post-metadata">

**Author:** ![vdespa](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/vdespa/32/2770_2.png) [@vdespa](https://community.postman.com/u/vdespa)\
**Post date:** [October 28, 2021, 12:03pm UTC](https://community.postman.com/t/long-run-in-newman-or-postman-runner/7644/12 "2021-10-28T12:03:10Z")

</div>

The data-leak is due to the fact that newman stores all the request and response data for reporting purposes.

AFAIK there is no flag, but I have seen some related issues on the GitHub.

---

<div class="post-metadata">

**Author:** ![joint-operations-ar3](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/joint-operations-ar3/32/11690_2.png) [@joint-operations-ar3](https://community.postman.com/u/joint-operations-ar3)\
**Post date:** [July 27, 2022, 11:18am UTC](https://community.postman.com/t/long-run-in-newman-or-postman-runner/7644/13 "2022-07-27T11:18:17Z")

</div>

I tried to run 50 collections in parallel using Newman npm. Each run adds 10 MB of memory usage (that’s a huge amount for a single collection), and each operation adds a further load of 1-2 MB.
