Not able to maintain more VUs and solve goroutine error

Hi,
I need to run a script for 190s duration and calling 3 different API’s for each VUs with some waiting time in-between the API calls.
When running below example getting “goroutine” error.(sample piece of error below)
Please suggest me how we can achieve this?
How to maintain more VUs or make them sleep and reuse.

export let options = {
    scenarios: {
        load: {
            executor: 'constant-arrival-rate',
            exec: 'getExecute',
            rate: 100,
            duration: '190s',
            preAllocatedVUs: 100,
            maxVUs: 19000,
            gracefulStop: '300s',
        }
}
};

export function getExecute(){
        startCall();
        sleep(120);
        runCall();
        sleep(60);
        terminateCall()
}

export function startCall() {
        const response = http.post(url, payload, params);
        check(response, {'status is 200': r => r.status == 200});
}
export function runCall() {
        const response = http.post(url, payload, params);
        check(response, {'status is 200': r => r.status == 200});
}
export function terminateCall() {
        const response = http.post(url, payload, params);
        check(response, {'status is 200': r => r.status == 200});
}

goroutine error:

goroutine 160624 [running]:
        goroutine running on other thread; stack unavailable
created by net/http.(*persistConn).addTLS
        net/http/transport.go:1526 +0x1f6

Hi @Anand
Welcome to the forum :tada:

This error looks like a potential bug but it’s not clear what exactly is happening: could you please post the complete output from k6 run beyond these 4 lines? Also, which version of k6 is this from and what command you’re using? This script on its own does not result in such an error so additional information about how it is run and about the setup used is needed.

Maybe your system ran out of memory? What are the specs of the machine you’re running this on?

As a general guideline, you probably don’t want to have so much sleep() in arrival-rate tests. If possible, I’d suggest you split this test in 3 different scenarios that run simultaneously, each one with a different rate. That way you won’t have so many sleeping VUs all of the time.