Hi,
I create a script on my mac to run k6 websocket stress testing. When VU increased to 3000, there will be connection error. I want to create 5000 ~ 6000 websocket connections.
K6 version: k6 v0.41.0 ((devel), go1.19.3, darwin/amd64)
The errors would be:
WARN[0027] Attempt to establish a WebSocket connection failed error="websocket: bad handshake"
Or
WARN[0050] Attempt to establish a WebSocket connection failed error="context canceled"
Or
WARN[0020] Attempt to establish a WebSocket connection failed error="dial tcp 13.195.206.8:443: connect: connection refused"
The K6 executor is “Rumping VUs” with stages options.
export const options = {
stages: [
{ duration: '1m', target: 200 }, // below normal load
{ duration: '2m', target: 500 },
{ duration: '5m', target: 1000 }, // normal load
{ duration: '5m', target: 1500 },
{ duration: '5m', target: 2000 },
{ duration: '5m', target: 2500 }, // around the breaking point
{ duration: '5m', target: 3000 }, // beyond the breaking point
{ duration: '1m', target: 0 }, // scale down. Recovery stage.
],
};
And I checked service log, there is no related error or exception. I doubt if there is some OS limits to create more websocet connection with k6.
How can I investigate what the bottleneck is?
Thanks,
Ian