At high rates, k6 errors with `dial tcp 10.0.3.15:443: connect: cannot assign requested address`.

AdvancedTroubleshootingk6 Load Testing
Answer

Likely causes → Ephemeral port exhaustion on the load generator: too many new connections to one destination IP:port, with old sockets stuck in TIME_WAIT. Often caused by noConnectionReuse or noVUConnectionReuse, or the server closing connections after each request.

Diagnose →

ss -tan state time-wait | wc -l
sysctl net.ipv4.ip_local_port_range

Fix → Enable connection reuse, widen the port range (sysctl -w net.ipv4.ip_local_port_range="1024 65000"), and spread load across multiple generators or target IPs.

Prevent → Run large tests distributed with the k6 Operator and check the generator's network metrics as part of the test.

All SRE & Reliability questions Roadmap: SRE & incident response

More on k6 Load Testing