Skip to main content
  1. Posts/

K6 Soak Tests: Too Many Open Files

·1 min·

Soak tests with k6 might generate this error:

ERRO[0543] GoError: dial tcp socket: too many open files
running at*WS).Connect-fm (native)

Indicating a hard limit imposed by the Linux kernel, as the k6 process was trying to establish a lot of simultaneous connections.

This error can relate to personal file descriptor limits:

% ulimit -n

The fix was simple:

% ulimit -n 10000

And to verify:

% ulimit -n