JavaScript heap out of memory - cli on linux

Hi everyone,

I’m running a Postman collection on a home server running Linux Ubuntu 22.04 TLS. The command I’m using is:

markdownCopy code

postman collection run 16538739-47292400-f53f-4e92-9754-******** -e 16538739-7a248856-61a9-414f-b025-********** -i 16538739-550cdac1-63aa-4bdc-81ad-******** -n 68454 --verbose | tee -a file.txt

This command executes one request and saves one response. The execution involves a pre-request script to iterate through an internal “document” variable in the body of the request.

Pre-Request Script:

javascriptCopy code

let documents = pm.environment.get("documents");

if (!documents || documents.length == 0) {
    documents = [
        #########
    ];
}

let currentdocument = documents.shift();
pm.environment.set("document", currentdocument);
pm.environment.set("documents", documents);

The test is simple, validating an HTTP status code to identify errors:

javascriptCopy code

pm.test("Status code is 200", function () {
    pm.response.to.have.status(200);
});

However, during iteration 11**, the process crashes and the error message is:

lessCopy code

"Iteration 1132/69585
→ /AnulacionFull
<--- Last few GCs --->

[9714:0x4398fb0]  4177299 ms: Scavenge (reduce) 1891.4 (1915.4) -> 1890.4 (1915.4) MB, 2.2 / 0.0 ms  (average mu = 0.375, current mu = 0.429) allocation failure
[9714:0x4398fb0]  4177440 ms: Scavenge (reduce) 1891.6 (1915.9) -> 1890.6 (1915.9) MB, 20.2 / 0.0 ms  (average mu = 0.375, current mu = 0.429) allocation failure
[9714:0x4398fb0]  4177616 ms: Scavenge (reduce) 1892.1 (1916.4) -> 1891.1 (1916.4) MB, 6.2 / 0.0 ms  (average mu = 0.375, current mu = 0.429) allocation failure


<--- JS stacktrace --->

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: 0x99e1e0 node::Abort() [postman]
 2: 0x8c9613 node::FatalError(char const*, char const*) [postman]
 3: 0x1069a0e v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [postman]
 4: 0x1069cb6 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [postman]
 5: 0x1229e35  [postman]
 6: 0x122ab6e v8::internal::Heap::RecomputeLimits(v8::internal::GarbageCollector) [postman]
 7: 0x1238ded v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [postman]
 8: 0x123975a v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [postman]
 9: 0x123ca0b v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [postman]
10: 0x120787d v8::internal::Factory::NewLoadHandler(int, v8::internal::AllocationType) [postman]
11: 0x12c8baf v8::internal::LoadHandler::LoadFullChain(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Map>, v8::internal::MaybeObjectHandle const&, v8::internal::Handle<v8::internal::Smi>) [postman]
12: 0x12d55da v8::internal::LoadIC::UpdateCaches(v8::internal::LookupIterator*) [postman]
13: 0x12d5e73 v8::internal::LoadIC::Load(v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Name>, bool, v8::internal::Handle<v8::internal::Object>) [postman]
14: 0x12dae7c v8::internal::Runtime_LoadIC_Miss(int, unsigned long*, v8::internal::Isolate*) [postman]
15: 0x198cdb9  [postman]

The home server is a Celeron 2.4 with 4GB of RAM. It’s an older machine. The Linux system is new, and no other processes are running.

this same runner in windows (in other computer) consumed ram but not all

Any insights on how to resolve this issue would be greatly appreciated.

Thank you!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.