hashicorp/nomad · error
http_max_size must be < %d but found %d
Error message
http_max_size must be < %d but found %d
What it means
Returned by ArtifactConfig.Validate when http_max_size parses successfully as a byte size but exceeds math.MaxInt64 (9223372036854775807 bytes, ~9.2 EB). Nomad stores the size internally as a signed 64-bit integer, so a larger value would overflow; the config is rejected instead.
Source
Thrown at nomad/structs/config/artifact.go:181
return fmt.Errorf("artifact must not be nil")
}
if a.HTTPReadTimeout == nil {
return fmt.Errorf("http_read_timeout must be set")
}
if v, err := time.ParseDuration(*a.HTTPReadTimeout); err != nil {
return fmt.Errorf("http_read_timeout not a valid duration: %w", err)
} else if v < 0 {
return fmt.Errorf("http_read_timeout must be > 0")
}
if a.HTTPMaxSize == nil {
return fmt.Errorf("http_max_size must be set")
}
if v, err := humanize.ParseBytes(*a.HTTPMaxSize); err != nil {
return fmt.Errorf("http_max_size not a valid size: %w", err)
} else if v > math.MaxInt64 {
return fmt.Errorf("http_max_size must be < %d but found %d", int64(math.MaxInt64), v)
}
if a.GCSTimeout == nil {
return fmt.Errorf("gcs_timeout must be set")
}
if v, err := time.ParseDuration(*a.GCSTimeout); err != nil {
return fmt.Errorf("gcs_timeout not a valid duration: %w", err)
} else if v < 0 {
return fmt.Errorf("gcs_timeout must be > 0")
}
if a.GitTimeout == nil {
return fmt.Errorf("git_timeout must be set")
}
if v, err := time.ParseDuration(*a.GitTimeout); err != nil {
return fmt.Errorf("git_timeout not a valid duration: %w", err)
} else if v < 0 {
return fmt.Errorf("git_timeout must be > 0")View on GitHub (pinned to 482b49bf1a)
Solutions
- Lower http_max_size to a realistic value below 9223372036854775807 bytes, e.g. "1tb" or "10gb".
- If you intended unlimited downloads, remove/omit the constraint rather than using a huge sentinel value.
- Verify the unit: eb/exabytes vs mb/megabytes — an exabyte-scale value will always trip this.
Example fix
// before
artifact {
http_max_size = "10eb"
}
// after
artifact {
http_max_size = "10gb"
} Defensive patterns
Strategy: validation
Validate before calling
func fitsInt64(s string) bool {
v, err := humanize.ParseBytes(s)
return err == nil && v <= math.MaxInt64
} Type guard
func isSaneMaxSize(s string) bool {
v, err := humanize.ParseBytes(s)
return err == nil && v > 0 && v <= math.MaxInt64
} Prevention
- Use realistic sizes (mb/gb/tb); avoid exabyte-scale values.
- Do not use giant sentinel values for 'unlimited'.
- Check computed sizes against math.MaxInt64 when generating config programmatically.
When it happens
Trigger: Setting `http_max_size` to an astronomically large value such as "10eb", "10000000tb", or a huge bare byte count greater than 9223372036854775807 that still parses via humanize.ParseBytes.
Common situations: Using "0" or a sentinel to mean unlimited but picking a giant value instead; misreading the unit scale (eb vs mb); generated config from tooling multiplying values wrongly; attempting "unlimited" via a maximum literal.
Related errors
- wait config is nil or empty
- missing datacenter for client registration
- default_identity_ttl must be greater than 0
- max_identity_ttl must be greater than 0
- max_identity_ttl must be greater than or equal to default_id
AI-assisted analysis of hashicorp/nomad@482b49bf1a (2026-09-04).
Data as JSON: /api/errors/0558858a94e32962.
Report an issue: GitHub.