weaviate/weaviate · error
parse PERSISTENCE_LSM_MAX_SEGMENT_SIZE: %w
Error message
parse PERSISTENCE_LSM_MAX_SEGMENT_SIZE: %w
What it means
Startup configuration error: PERSISTENCE_LSM_MAX_SEGMENT_SIZE is set but cannot be parsed as a resource size string (e.g. '64MiB', '1GiB'). Malformed values like '64MBx' or bare nonsense abort FromEnv, preventing the LSM segment-size tuning from taking an unintended value.
Source
Thrown at usecases/config/environment.go:516
// default to false (debug surface closed) only when nothing set it.
if v, ok := os.LookupEnv("DEBUG_ENDPOINTS_ENABLED"); ok {
config.Profiling.DebugEndpointsEnabled = configRuntime.NewDynamicValue(entcfg.Enabled(v))
} else if config.Profiling.DebugEndpointsEnabled == nil {
config.Profiling.DebugEndpointsEnabled = configRuntime.NewDynamicValue(false)
}
if !config.Authentication.AnyAuthMethodSelected() {
config.Authentication = DefaultAuthentication
}
if os.Getenv("PERSISTENCE_LSM_ACCESS_STRATEGY") == "pread" {
config.AvoidMmap = true
}
if v := os.Getenv("PERSISTENCE_LSM_MAX_SEGMENT_SIZE"); v != "" {
parsed, err := parseResourceString(v)
if err != nil {
return fmt.Errorf("parse PERSISTENCE_LSM_MAX_SEGMENT_SIZE: %w", err)
}
config.Persistence.LSMMaxSegmentSize = parsed
} else {
config.Persistence.LSMMaxSegmentSize = DefaultPersistenceLSMMaxSegmentSize
}
if err := parseNonNegativeInt(
"PERSISTENCE_LSM_SEGMENTS_CLEANUP_INTERVAL_HOURS",
func(hours int) { config.Persistence.LSMSegmentsCleanupIntervalSeconds = hours * 3600 },
DefaultPersistenceLSMSegmentsCleanupIntervalSeconds,
); err != nil {
return err
}
if entcfg.Enabled(os.Getenv("PERSISTENCE_LSM_SEPARATE_OBJECTS_COMPACTIONS")) {
config.Persistence.LSMSeparateObjectsCompactions = true
}View on GitHub (pinned to 75aa4b6d11)
Solutions
- Set the variable to a valid resource string such as '64MiB' or '1GiB'
- Unset the variable to fall back to the default segment size
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at usecases/config/environment.go:516 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of weaviate/weaviate@75aa4b6d11 (2026-09-04).
Data as JSON: /api/errors/29d892582ada416b.
Report an issue: GitHub.