grafana/k6 · error
the number of VUs must be more than 0
Error message
the number of VUs must be more than 0
What it means
PerVUIterationsConfig.Validate rejected a vus value <= 0. The per-VU-iterations executor runs a fixed iteration count in each of a fixed number of VUs, so at least one VU is required; the value is also segment-scaled, and a segment yielding 0 VUs fails here too.
Source
Thrown at lib/executor/per_vu_iterations.go:74
// important to note that scaling per-VU iteration executor affects only the
// number of VUs. If we also scaled the iterations, scaling would have quadratic
// effects instead of just linear.
func (pvic PerVUIterationsConfig) GetIterations() int64 {
return pvic.Iterations.Int64
}
// GetDescription returns a human-readable description of the executor options
func (pvic PerVUIterationsConfig) GetDescription(et *lib.ExecutionTuple) string {
return fmt.Sprintf("%d iterations for each of %d VUs%s",
pvic.GetIterations(), pvic.GetVUs(et),
pvic.getBaseInfo(fmt.Sprintf("maxDuration: %s", pvic.MaxDuration.Duration)))
}
// Validate makes sure all options are configured and valid
func (pvic PerVUIterationsConfig) Validate() []error {
errors := pvic.BaseConfig.Validate()
if pvic.VUs.Int64 <= 0 {
errors = append(errors, fmt.Errorf("the number of VUs must be more than 0"))
}
if pvic.Iterations.Int64 <= 0 {
errors = append(errors, fmt.Errorf("the number of iterations must be more than 0"))
}
if pvic.MaxDuration.TimeDuration() < minDuration {
errors = append(errors, fmt.Errorf(
"the maxDuration must be at least %s, but is %s", minDuration, pvic.MaxDuration,
))
}
return errors
}
// GetExecutionRequirements returns the number of required VUs to run the
// executor for its whole duration (disregarding any startTime), including the
// maximum waiting time for any iterations to gracefully stop. This is used byView on GitHub (pinned to 01ffac6f24)
Solutions
- Set vus to a positive integer, e.g. vus: 10, iterations: 20
- Ensure the execution segment is wide enough to scale to at least 1 VU
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at lib/executor/per_vu_iterations.go:74 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of grafana/k6@01ffac6f24 (2026-08-18).
Data as JSON: /api/errors/291bb1940a643867.
Report an issue: GitHub.