argoproj/argo-workflows · error
retryMultiple cannot be less than 0
Error message
retryMultiple cannot be less than 0
What it means
validateProxyParams rejects a negative retryMultiple, the exponential backoff multiplier applied to baseDelay on each reconnect attempt. A negative multiplier would invert the backoff progression, so NewSessionProxy rejects it. Pure input validation.
Source
Thrown at util/sqldb/session.go:71
Username string
Password string
MaxRetries int
BaseDelay time.Duration
MaxDelay time.Duration
}
func validateProxyParams(proxy *SessionProxy) error {
if proxy.maxRetries < 0 {
return fmt.Errorf("maxRetries cannot be less than 0")
}
if proxy.baseDelay < 0 {
return fmt.Errorf("baseDelay cannot be less than 0")
}
if proxy.maxDelay < 0 {
return fmt.Errorf("maxDelay cannot be less than 0")
}
if proxy.retryMultiple < 0 {
return fmt.Errorf("retryMultiple cannot be less than 0")
}
return nil
}
// NewSessionProxy creates a new SessionProxy with the given configuration
func NewSessionProxy(ctx context.Context, config SessionProxyConfig) (*SessionProxy, error) {
dbType := dbTypeFromConfig(&config.DBConfig)
proxy := &SessionProxy{
kubectlConfig: config.KubectlConfig,
namespace: config.Namespace,
dbConfig: &config.DBConfig,
username: config.Username,
password: config.Password,
dbType: dbType,
maxRetries: config.MaxRetries,
baseDelay: config.BaseDelay,
maxDelay: config.MaxDelay,
retryMultiple: 2.0,View on GitHub (pinned to 35bff19146)
Solutions
- Set RetryMultiple to a positive value (typically 1.0 or 2.0); values between 0 and 1 are tolerated but clamped to 1.0.
- Fix the negative retryMultiple in the dbReconnectConfig config entry.
- If parsing from YAML/JSON, verify sign and that the field is a number, not a string coerced oddly.
- Omit the field entirely to keep the default 2.0.
Example fix
// before retryMultiple: -1.5 // after retryMultiple: 2.0
Defensive patterns
Strategy: validation
Validate before calling
if cfg.RetryMultiple < 0 {
return fmt.Errorf("RetryMultiple must be >= 0, got %f", cfg.RetryMultiple)
} Try / catch
if err := NewSessionProxy(ctx, cfg); err != nil {
if strings.Contains(err.Error(), "retryMultiple cannot be less than 0") {
cfg.DBConfig.DBReconnectConfig.RetryMultiple = 2.0
return NewSessionProxy(ctx, cfg)
}
return err
} Prevention
- Default to omitting retryMultiple (library default is 2.0).
- Note values between 0 and 1 are silently clamped to 1.0 — prefer explicit 1.0 or 2.0.
- Validate float sign in YAML config pipelines.
- Document accepted range (0 < v, typical 1.0–3.0) for operators.
When it happens
Trigger: Calling NewSessionProxy with DBConfig.DBReconnectConfig.RetryMultiple < 0 (the only path that sets it, other than the internal default 2.0).
Common situations: Negative retryMultiple in the controller config dbReconnectConfig; a config generator emitting a negative float; confusion with the (allowed but clamped) 0..1 range, which the code coerces to 1.0.
Understand the failure class
Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.
Related errors
- maxRetries cannot be less than 0
- baseDelay cannot be less than 0
- maxDelay cannot be less than 0
- insufficient authentication information provided
- invalid uid
AI-assisted analysis of argoproj/argo-workflows@35bff19146 (2026-09-03).
Data as JSON: /api/errors/cd419752f0714910.
Report an issue: GitHub.