VarnishApache Airflow

Varnish Backend Failures Signal Apache Timeout Misconfiguration

critical
Connection ManagementUpdated Nov 6, 2025

Rising varnish_backend_fail and varnish_backend_toolate metrics indicate Varnish is timing out waiting for Apache responses, often due to misaligned timeout configurations between proxy and origin.

How to detect:

Spike in varnish_backend_fail or varnish_backend_toolate, especially when correlated with Apache slow request processing times or high worker utilization. Backend failures occurring before Apache's configured Timeout suggests Varnish is giving up too early.

Recommended action:

Align Varnish backend timeout settings with Apache's Timeout and ProxyTimeout directives. Ensure cumulative timeouts (client → Varnish → Apache → backend processing) don't exceed user expectations. For Apache reverse proxies, set ProxyTimeout to 60-120s for long jobs. Enable Varnish grace mode to serve stale content during backend issues.