vitessio/vitess · warning
invalid int64 value for %v: %v
Error message
invalid int64 value for %v: %v
What it means
This error comes from the tabletserver debug environment variable handler (debugenv.go). When an operator requests a runtime variable update through the debug env endpoint, the new value must parse as an int64 via strconv.ParseInt. If parsing fails, the handler wraps the parse error with the variable name and returns it to the caller.
Source
Thrown at go/vt/vttablet/tabletserver/debugenv.go:119
return nil
}
setIntValCtx := func(f func(context.Context, int) error) error {
ival, err := strconv.Atoi(value)
if err == nil {
err = f(r.Context(), ival)
}
if err != nil {
return fmt.Errorf("failed setting value for %v: %v", varname, err)
}
msg = fmt.Sprintf("Setting %v to: %v", varname, value)
return nil
}
setInt64Val := func(f func(int64)) error {
ival, err := strconv.ParseInt(value, 10, 64)
if err != nil {
return fmt.Errorf("invalid int64 value for %v: %v", varname, err)
}
f(ival)
msg = fmt.Sprintf("Setting %v to: %v", varname, value)
return nil
}
setDurationVal := func(f func(time.Duration)) error {
durationVal, err := time.ParseDuration(value)
if err != nil {
return fmt.Errorf("invalid duration value for %v: %v", varname, err)
}
f(durationVal)
msg = fmt.Sprintf("Setting %v to: %v", varname, value)
return nil
}
setFloat64Val := func(f func(float64)) error {
fval, err := strconv.ParseFloat(value, 64)View on GitHub (pinned to 01a25a7d17)
Solutions
- Check the value being sent parses with strconv.ParseInt(value, 10, 64); fix the payload
- Convert durations or sizes to plain integer form (e.g. 134217728 instead of '128M') before sending
- Retry with a valid integer literal; the wrapped strconv error in the message names the exact parse failure
Example fix
// before curl 'host:port/debug/env?var=TransactionTimeout&value=30s' // after curl 'host:port/debug/env?var=TransactionTimeout&value=30000000000'
Defensive patterns
Strategy: validation
Validate before calling
n, err := strconv.ParseInt(value, 10, 64)
if err != nil { return fmt.Errorf("invalid int64 for %s: %w", varname, err) } Prevention
- Always send plain base-10 integer strings to /debug/env int64 vars
- No units, commas, floats, or whitespace in the value
- Sanitize automation inputs before calling the debug endpoint
When it happens
Trigger: POST/GET to the tabletserver /debug/env (settable variable) endpoint with a variable handled by setInt64Val whose value string is not a valid base-10 int64 (e.g. 'abc', '1.5', '99999999999999999999', empty string, or a value with units like '100m').
Common situations: Automation scripts or curl commands writing debug vars with quoted or suffixed values ('128M' instead of 134217728); float or bool values passed where an integer is required; locale/whitespace contamination in the value.
Related errors
- invalid duration value for %v: %v
- invalid float64 value for %v: %v
- cannot parse int64 from %q: %w
- unparsed tail left after parsing int64 from %q: %q
- stray %% at the end of pattern
AI-assisted analysis of vitessio/vitess@01a25a7d17 (2026-09-01).
Data as JSON: /api/errors/b79ed664823d86e1.
Report an issue: GitHub.