JuliusBrussee/caveman · error

cachebench: replay body exceeds configured request limit

Error message

cachebench: replay body exceeds configured request limit

What it means

Error "cachebench: replay body exceeds configured request limit" thrown in JuliusBrussee/caveman.

Source

Thrown at cacheengine/cachebench/replay_http.go:124

		}
	} else {
		clone := *client
		if config.RequestTimeout != 0 || clone.Timeout <= 0 || clone.Timeout > requestTimeout {
			clone.Timeout = requestTimeout
		}
		client = &clone
	}
	client.CheckRedirect = func(_ *http.Request, _ []*http.Request) error { return http.ErrUseLastResponse }
	return &HTTPReplayTransport{client: client, credentials: config.Credentials, baseURLs: parsed, maxRequestBytes: requestLimit, maxResponseBytes: limit}, nil
}

// Send authenticates and sends one bounded provider request without retry.
func (transport *HTTPReplayTransport) Send(ctx context.Context, outbound ReplayOutbound) (ReplayResponse, error) {
	if transport == nil || transport.client == nil {
		return ReplayResponse{}, errors.New("cachebench: nil HTTP replay transport")
	}
	if int64(len(outbound.Body)) > transport.maxRequestBytes {
		return ReplayResponse{}, errors.New("cachebench: replay body exceeds configured request limit")
	}
	provider := strings.ToLower(strings.TrimSpace(outbound.Provider))
	if !validBoundedText(provider, 64, false) {
		return ReplayResponse{}, errors.New("cachebench: invalid replay provider")
	}
	endpoint, err := transport.endpoint(provider, outbound)
	if err != nil {
		return ReplayResponse{}, err
	}
	if !validUniqueJSONObject(outbound.Body) {
		return ReplayResponse{}, errors.New("cachebench: replay body must be one JSON object")
	}
	request, err := http.NewRequestWithContext(ctx, http.MethodPost, endpoint.String(), bytes.NewReader(outbound.Body))
	if err != nil {
		return ReplayResponse{}, errors.New("cachebench: could not build provider request")
	}
	request.Header.Set("content-type", "application/json")
	request.Header.Set("accept", "application/json")

View on GitHub (pinned to 27d5a3981a)

Solutions

  1. Reduce the replay body size below the configured request limit.

When it happens

Trigger: Thrown at cacheengine/cachebench/replay_http.go:124 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/441b692e89e920bb. Report an issue: GitHub.