JuliusBrussee/caveman · error
CAVEMAN_CCR_MAX_BYTES must be a positive integer
Error message
CAVEMAN_CCR_MAX_BYTES must be a positive integer
What it means
Error "CAVEMAN_CCR_MAX_BYTES must be a positive integer" thrown in JuliusBrussee/caveman.
Source
Thrown at engine/ccr/store_sqlite.go:132
return err
}
func isBusy(err error) bool {
if err == nil {
return false
}
s := err.Error()
return strings.Contains(s, "database is locked") || strings.Contains(s, "SQLITE_BUSY")
}
// Open opens (creating if needed) the SQLite database at path and migrates the
// schema. Use ":memory:" for an ephemeral store (tests, the eval harness).
func Open(path string) (*Store, error) {
maxBytes := DefaultMaxStorageBytes
if raw := strings.TrimSpace(os.Getenv("CAVEMAN_CCR_MAX_BYTES")); raw != "" {
parsed, err := strconv.ParseInt(raw, 10, 64)
if err != nil || parsed <= 0 {
return nil, fmt.Errorf("CAVEMAN_CCR_MAX_BYTES must be a positive integer")
}
maxBytes = parsed
}
return OpenWithBudget(path, maxBytes)
}
// OpenWithBudget opens a persistent store with an explicit retained-payload
// budget. New writes fail with ErrBudgetExceeded; existing recovery rows are
// never evicted because an emitted transformed request may still reference any
// handle.
func OpenWithBudget(path string, maxBytes int64) (*Store, error) {
return openWithBudget(path, maxBytes, nil)
}
func openWithBudget(path string, maxBytes int64, afterPrepare func()) (*Store, error) {
if maxBytes <= 0 {
return nil, fmt.Errorf("ccr max storage bytes must be positive")
}View on GitHub (pinned to 27d5a3981a)
Solutions
- Set CAVEMAN_CCR_MAX_BYTES to a positive integer.
When it happens
Trigger: Thrown at engine/ccr/store_sqlite.go:132 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of JuliusBrussee/caveman@27d5a3981a (2026-08-15).
Data as JSON: /api/errors/3c1087b6a3b33f3b.
Report an issue: GitHub.