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