grafana/k6 · error
requestsBurst must be greater than 0
Error message
requestsBurst must be greater than 0
What it means
validateConfig() requires requestsBurst, the token-bucket burst size for the url secret source's rate limiter, to be at least 1. A burst of 0 would make the limiter unable to admit even a single request. As with the other numeric fields, the default is valid, so only an explicit non-positive override triggers this.
Source
Thrown at internal/secretsource/url/url.go:591
return config, nil
}
func validateConfig(config extConfig) error {
// Validate required fields and value constraints
if err := validateURLTemplate(config.URLTemplate); err != nil {
return err
}
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_REQUESTS_BURST override to fall back to the default
- Or set it to a positive value, typically >= requestsPerMinuteLimit, e.g. '100'
- If computing burst from other values, guard with a max(1, computed) expression
Example fix
# before K6_SECRET_SOURCE_URL_REQUESTS_BURST='0' # after K6_SECRET_SOURCE_URL_REQUESTS_BURST='100'
Defensive patterns
Strategy: validation
Validate before calling
const burst = Number(process.env.K6_SECRET_SOURCE_URL_REQUESTS_BURST);
if (process.env.K6_SECRET_SOURCE_URL_REQUESTS_BURST && burst <= 0) {
throw new Error('requestsBurst must be > 0');
} Prevention
- Set burst >= requestsPerMinuteLimit for smooth limiting
- Guard computed burst values with Math.max(1, value)
- Never copy 0-filled rate-limit blocks between configs
When it happens
Trigger: Setting K6_SECRET_SOURCE_URL_REQUESTS_BURST='0' (or a negative integer), or "requestsBurst": 0 in the JSON/inline config.
Common situations: Copying the rate-limit settings and zeroing both; assuming burst=0 means 'no burst limit'; CI templates that define every variable with 0 defaults.
Related errors
- requestsPerMinuteLimit must be greater than 0
- urlTemplate must contain {key} placeholder
- urlTemplate must be an absolute URL with a scheme (e.g., htt
- timeout must be greater than 0
- maxRetries must be non-negative
AI-assisted analysis of grafana/k6@93accf6570 (2026-08-15).
Data as JSON: /api/errors/d72e93641290bc79.
Report an issue: GitHub.