postmanlabs / postman-app-support

Postman is an API platform for building and using APIs. Postman simplifies each step of the API lifecycle and streamlines collaboration so you can create better APIs—faster.
https://www.postman.com
5.83k stars 839 forks source link

Postman manual runner crashes postman after enough (~50) requests #12570

Open mallechilie opened 9 months ago

mallechilie commented 9 months ago

Is there an existing issue for this?

Describe the Issue

When doing a manual run with enough requests (50+), postman crashes.

This seems to be a memory issue: afbeelding There's a clear rise in memory usage until the crash happens.

This crash results in the following issue.

Steps To Reproduce

  1. Open a new folder with 1 valid request (I used a get ticket from freshdesk)
  2. In that request set the following pre-request script:
    if(!pm.collectionVariables.get("counter")){
    pm.collectionVariables.set("counter", 0)
    }
    if(pm.collectionVariables.get("counter") < 1000){
    postman.setNextRequest([name of current request here]);
    console.log(pm.collectionVariables.get("counter"))
    pm.collectionVariables.set("counter", pm.collectionVariables.get("counter") + 1);
    }
    else{
    pm.collectionVariables.unset("counter");
    }
  3. Run the folder (1 iteration will be enough)
  4. Wait until postman crashes. (In my case, postman crashed before the counter hit 50)

Screenshots or Videos

No response

Operating System

Windows

Postman Version

10.12.11

Postman Platform

Postman App

User Account Type

Signed In User

Additional Context?

No response

eberls commented 7 months ago

I'm seeing this after about 220 iterations where the helper process grows to about 2.75GB while executing request that is processing pagenated elements of a list (list of target IDs, when queried may have paged results). This is repeatable. Additionally, I'm left with a Runner tab that needs to be force closed on restart. (I'm pulling from an Okta API, and collating results in variables.)

My prereqeust script pulls from a variable to set a query ID, and optionally the continued pagination of results. My test script aggregates the results.

I'm running on MacOS 14.3.1, Postman (Desktop) version 10.24.3, both are up to date as of this writing.