JuliusBrussee/caveman · error
cachebench: replay schedule duration overflow
Error message
cachebench: replay schedule duration overflow
What it means
Error "cachebench: replay schedule duration overflow" thrown in JuliusBrussee/caveman.
Source
Thrown at cacheengine/cachebench/replay.go:412
}
tokens[record.TokenBasis] = true
if record.DeclaredInputTokens <= 0 || record.DeclaredInputTokens < record.PrefixTokens || record.MaxOutputTokens <= 0 || !requestBudgetMatchesBody(record) {
return ReplayPreflight{}, fmt.Errorf("cachebench: replay request %q has invalid billed-token budget", record.RequestID)
}
input, output := int64(record.DeclaredInputTokens), int64(record.MaxOutputTokens)
if input > limits.MaxDeclaredBilledTokens-worstCase || output > limits.MaxDeclaredBilledTokens-worstCase-input {
return ReplayPreflight{}, fmt.Errorf("cachebench: replay declared billed-token ceiling exceeds limit %d", limits.MaxDeclaredBilledTokens)
}
declaredInput += input
declaredOutput += output
worstCase += input + output
if !previous.IsZero() {
gap, err := scaledReplayGap(at.Sub(previous), timeScale)
if err != nil || gap > limits.MaxGap {
return ReplayPreflight{}, fmt.Errorf("cachebench: replay gap before %q exceeds limit %s", record.RequestID, limits.MaxGap)
}
if int64(gap) > math.MaxInt64-scheduled {
return ReplayPreflight{}, errors.New("cachebench: replay schedule duration overflow")
}
scheduled += int64(gap)
}
previous = at
}
bases := make([]string, 0, len(timing))
for basis := range timing {
bases = append(bases, basis)
}
sort.Strings(bases)
tokenBases := make([]string, 0, len(tokens))
for basis := range tokens {
tokenBases = append(tokenBases, basis)
}
sort.Strings(tokenBases)
return ReplayPreflight{
Requests: len(records), DeclaredInputTokens: declaredInput,
DeclaredMaxOutputTokens: declaredOutput, DeclaredBilledTokens: worstCase,View on GitHub (pinned to 27d5a3981a)
Solutions
- Reduce the replay schedule so the total duration does not overflow.
When it happens
Trigger: Thrown at cacheengine/cachebench/replay.go:412 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/cba2fcd6e12eeaef.
Report an issue: GitHub.