weaviate/weaviate · error
parse TRANSFER_INACTIVITY_TIMEOUT as duration: %w
Error message
parse TRANSFER_INACTIVITY_TIMEOUT as duration: %w
What it means
FromEnv reads TRANSFER_INACTIVITY_TIMEOUT and parses it with time.ParseDuration to configure how long a shard/replica transfer may be inactive before being considered failed. An invalid duration string is wrapped as "parse TRANSFER_INACTIVITY_TIMEOUT as duration: %w" and aborts config loading so the operator sees the bad env var immediately.
Source
Thrown at usecases/config/environment.go:224
if err != nil {
return fmt.Errorf("parse LAZY_LOAD_SHARD_SIZE_THRESHOLD_GB as float: %w", err)
}
if asFloat < 0 {
return fmt.Errorf("LAZY_LOAD_SHARD_SIZE_THRESHOLD_GB must be >= 0")
}
config.LazyLoadShardSizeThresholdGB = asFloat
} else {
config.LazyLoadShardSizeThresholdGB = DefaultLazyLoadShardSizeThresholdGB
}
if entcfg.Enabled(os.Getenv("FORCE_FULL_REPLICAS_SEARCH")) {
config.ForceFullReplicasSearch = true
}
if v := os.Getenv("TRANSFER_INACTIVITY_TIMEOUT"); v != "" {
timeout, err := time.ParseDuration(v)
if err != nil {
return fmt.Errorf("parse TRANSFER_INACTIVITY_TIMEOUT as duration: %w", err)
}
config.TransferInactivityTimeout = timeout
} else {
config.TransferInactivityTimeout = DefaultTransferInactivityTimeout
}
err := parsePositiveDuration(
"HALT_FOR_TRANSFER_TIMEOUT",
func(val time.Duration) { config.HaltForTransferTimeout = val },
DefaultHaltForTransferTimeout,
)
if err != nil {
return err
}
// Recount all property lengths at startup to support accurate BM25 scoring
if entcfg.Enabled(os.Getenv("RECOUNT_PROPERTIES_AT_STARTUP")) {
config.RecountPropertiesAtStartup = trueView on GitHub (pinned to 75aa4b6d11)
Solutions
- Use a valid Go duration with an explicit unit, e.g. TRANSFER_INACTIVITY_TIMEOUT=2m or 1h30m.
- Unset the variable to use DefaultTransferInactivityTimeout.
- Verify with Go's ParseDuration semantics: number+unit (ns, us, ms, s, m, h), no spaces.
Example fix
// before TRANSFER_INACTIVITY_TIMEOUT=90 // after TRANSFER_INACTIVITY_TIMEOUT=90s
Defensive patterns
Strategy: validation
Validate before calling
v := os.Getenv("TRANSFER_INACTIVITY_TIMEOUT")
if v != "" {
if _, err := time.ParseDuration(v); err != nil {
return fmt.Errorf("invalid TRANSFER_INACTIVITY_TIMEOUT %q: %w", v, err)
}
} Type guard
func validDuration(v string) bool {
_, err := time.ParseDuration(v)
return err == nil
} Prevention
- Always write durations with units (90s, 2m, 1h); bare numbers are rejected.
- Use Go duration syntax, not k8s-only or human forms like "90min" or "1 hr".
- Keep a reference table of duration-typed Weaviate env vars in your ops runbook.
When it happens
Trigger: TRANSFER_INACTIVITY_TIMEOUT set to a value time.ParseDuration rejects: "90" (no unit), "2h30" (incomplete compound), "90min", "1 hr", or whitespace-padded values, during LoadConfig.
Common situations: Following docs from other systems that accept bare seconds; writing "90min" instead of "90m"; k8s duration formats like "1h30m0s" are fine but "90" is not; leftover placeholder values in compose files.
Understand the failure class
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
Related errors
- parse TRACK_VECTOR_DIMENSIONS_INTERVAL as duration: %w
- invalid tag key:
- configure auth broker: %w
- AUTHENTICATION_OIDC_NAMESPACE_CLAIM and AUTHENTICATION_OIDC_
- %s contains invalid entry %q; valid values are: %s
AI-assisted analysis of weaviate/weaviate@75aa4b6d11 (2026-09-04).
Data as JSON: /api/errors/f593eee2312b80e8.
Report an issue: GitHub.