K6 killed after ~50m of traffic

Hi all,

i need to run k6 for 24h or more. After ~50 minutes of traffic the k6 instance is being killed. I see massive memory consumption which is almost reaching the memory limit (5Gb) of my container.
I guess its due to the trends that are collected into memory while traffic runs. However these trends are essential to my test, so using --no-summary is not the solution. I’ve also tried redirecting the metrics into InfluxDB, but k6 is killed after ~2 minutes!
Could you please suggest a solution?

Thanks

Hi @tazmanian, can you tell us how many VUs you are running with and how much memory does it use … after the first few minutes … . Also which version of k6 you are running.

You could try to use the latest master version as there are some improvements on how k6 write to influxdb .
If you go down this road you can also try the new compatibility-mode which will reduce your memory usage significantly

Hi again,

i was using the latest stable version of k6. The number of VUs is 10.
It seems that using the latest master fixed the InfluxDB writes issue, however the rate of outgoing http requests was decreased significantly.
Thanks for the help.

Hi @tazmanian,

I’ve also tried redirecting the metrics into InfluxDB, but k6 is killed after ~2 minutes!

This shouldn’t happen. You mean it’s being killed by the OOM (out of memory) killer? Are you running InfluxDB on the same instance as k6? It’s recommended to use a separate machine/VM to avoid InfluxDB execution affecting k6. See the documentation for details.

however the rate of outgoing http requests was decreased significantly

This is also surprising. What was the difference between stable and master? Please share your script if possible, and command / environment you used for executing k6.