VarnishApache Airflow

Session Drop Rate Indicates Connection Queue Exhaustion

critical
Resource ContentionUpdated Nov 6, 2025

Elevated varnish_sess_drop signals that Varnish is rejecting connections due to worker thread exhaustion or queue overflow, often caused by slow backend responses keeping workers occupied.

How to detect:

Monitor varnish_sess_drop rate alongside varnish_sess_queued and backend response times. If sessions are being dropped while Apache's ListenBacklog or MaxRequestWorkers is maxed out, insufficient capacity is causing queue overflow.

Recommended action:

Increase Varnish thread pools or thread_pool_max if worker threads are exhausted. On the Apache side, verify ListenBacklog matches net.core.somaxconn (recommend 65535), increase MaxRequestWorkers if resources allow, and reduce KeepAliveTimeout (2-5s for APIs) to free workers faster. Consider implementing mod_reqtimeout to prevent slow clients from tying up resources.