grafana/k6 · error
retryBackoff must be greater than 0
Error message
retryBackoff must be greater than 0
What it means
validateConfig() requires a strictly positive retryBackoff duration for the url secret source; it is the base delay between retry attempts and a zero/negative backoff would make retries spin immediately. It only triggers when an explicit override makes the value non-positive, since the default is positive.
Source
Thrown at internal/secretsource/url/url.go:599
if config.Timeout.Duration <= 0 {
return errors.New("timeout must be greater than 0")
}
if config.RequestsPerMinuteLimit.Int64 <= 0 {
return errors.New("requestsPerMinuteLimit must be greater than 0")
}
if config.RequestsBurst.Int64 <= 0 {
return errors.New("requestsBurst must be greater than 0")
}
if config.MaxRetries.Int64 < 0 {
return errors.New("maxRetries must be non-negative")
}
if config.RetryBackoff.Duration <= 0 {
return errors.New("retryBackoff must be greater than 0")
}
return nil
}
View on GitHub (pinned to 93accf6570)
Solutions
- Remove the K6_SECRET_SOURCE_URL_RETRY_BACKOFF override to use the default
- Or set a small positive duration such as '100ms' or '1s'
- Audit config files for zeroed duration fields before deploying
Example fix
# before K6_SECRET_SOURCE_URL_RETRY_BACKOFF='0s' # after K6_SECRET_SOURCE_URL_RETRY_BACKOFF='500ms'
Defensive patterns
Strategy: validation
Validate before calling
const backoff = process.env.K6_SECRET_SOURCE_URL_RETRY_BACKOFF;
if (backoff && /^(0|[-\d.]+)/.test(backoff)) {
throw new Error('retryBackoff must be > 0');
} Prevention
- Omit retryBackoff to use the default instead of zeroing it
- Prefer small positive values like 100ms-1s
- Audit config files for 0s durations before deploy
When it happens
Trigger: Setting K6_SECRET_SOURCE_URL_RETRY_BACKOFF='0s' (or a negative duration), or "retryBackoff": "0s" in the JSON/inline config.
Common situations: Zeroing the backoff to make retries 'instant'; config scaffolds that set every duration to 0s; unit fixtures reusing a zeroed struct.
Related errors
- maxRetries must be non-negative
- urlTemplate must contain {key} placeholder
- urlTemplate must be an absolute URL with a scheme (e.g., htt
- timeout must be greater than 0
- requestsPerMinuteLimit must be greater than 0
AI-assisted analysis of grafana/k6@93accf6570 (2026-08-15).
Data as JSON: /api/errors/5c8e5d932d359324.
Report an issue: GitHub.