I’m trying to benchmark simple “echo servers” written in node and go. Just the basic stuff so I won’t post it here, but they work with netcat and multiple connections.
I’m using the tcp extension listed here
Specific extension here
The extension is so basic (like the servers its testing) I’m not really suspecting it of causing the error.
I get no errors if I run
./k6 run -i 1 ./index.js
This gets me an error
./k6 run -i 2 ./index.js
ERRO[0000] GoError: write tcp 127.0.0.1:64595->127.0.0.1:7005: use of closed network connection
at reflect.methodValueCall (native)
at file:///Users/kevin/Dev%EF%BC%BF/Go/k6-tcp/index.js:9:20(10)
at native executor=shared-iterations scenario=default source=stacktrace
No error here
./k6 run -i 2 -u 2 ./index.js
But this has the error
./k6 run -i 3 -u 2 ./index.js
You can see the pattern. Apparently connections are trying to be reused in some way. But I have no idea how a TCP connection is “reused” (http connection makes more sense)
I tried this but same problem
./k6 run -i 2 -u 1 --no-connection-reuse --no-vu-connection-reuse ./index.js