caddyserver/caddy · error
no upstreams available
Error message
no upstreams available
What it means
errNoUpstream is the sentinel error used when load balancing finds no available (healthy) upstream to proxy to. It is turned into a 503 Service Unavailable and is specially recognized so retry logic does not double-handle it.
Solutions
- Configure at least one upstream for the reverse proxy, and ensure upstreams are healthy and not all marked down.
- Check dynamic upstream resolution if used; it may be returning zero results.
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at modules/caddyhttp/reverseproxy/reverseproxy.go:1887 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of caddyserver/caddy@50e54ee279 (2026-08-15).
Data as JSON: /api/errors/32cb62ac6ccc1ab4.
Report an issue: GitHub.
Appendix: source
Thrown at modules/caddyhttp/reverseproxy/reverseproxy.go:1887
start time.Time
// logger is the prepared logger which is used to write logs
// with the request, duration, and selected upstream attached.
logger *zap.Logger
// isFinalized is whether the response has been finalized,
// i.e. copied and closed, to make sure that it doesn't
// happen twice.
isFinalized bool
}
// proxyHandleResponseContextCtxKey is the context key for the active proxy handler
// so that handle_response routes can inherit some config options
// from the proxy handler.
const proxyHandleResponseContextCtxKey caddy.CtxKey = "reverse_proxy_handle_response_context"
// errNoUpstream occurs when there are no upstream available.
var errNoUpstream = fmt.Errorf("no upstreams available")
// Interface guards
var (
_ caddy.Provisioner = (*Handler)(nil)
_ caddy.CleanerUpper = (*Handler)(nil)
_ caddyhttp.MiddlewareHandler = (*Handler)(nil)
)
View on GitHub (pinned to 50e54ee279)