GoError: rate: Wait(n=1) would exceed context deadline

Hi All,

At the end of execution I am seeing the following errors:

GoError: rate: Wait(n=1) would exceed context deadline

I presume this means the duration and gracefulStop would end before the final request is completed?

I have tried increased the gracefulStop duration but it seems to ignore the value I add and stick to 30:

export let options = {
duration: “5m”,
rps: 1,
VUs: “8”,
gracefulStop: “60s”,

Any ideas how to fix the error?

This is the first time I’m seeing the rate: Wait(n=1) would exceed context deadline error, please share some more details - which k6 version are you using, what is your OS, what is the full error stacktrace, etc.

Regarding gracefulStop, it’s only a valid option inside of a scenario definition, it’s not valid when it’s in the global options. The latest k6 version v0.32.0 would have printed a warning about that, so I assume you’re on a previous version.

And regarding the rps option, it has quite a few gotchas, so we discourage its use. Consider using an arrival-rate executor instead.

Thanks for the info ned. I am using Docker. In my docker-compose.yml is has this:

k6:
image: loadimpact/k6:latest

So I would have thought it would use the latest K6 each time I run it.

OK so I THOUGHT that Docker would automatically pull the latest K6 image when I ran the Docker command but it actual fact it was still using an 8 month old image.

So I have now removed that and it then pulled the latest K6 image down and the problem is now resolved.

Thanks ned