Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've a setup with haproxy as frontend to two varnish servers (say srvA, srvB). srvA and srvB also have nginx running on 'em and varnish serves as frontend to these servers. Few days back we collected stats to find out how many requests being served by varnish cache (i.e. with two X-Varnish values) were getting timed out on haproxy. Interestingly we found that almost 30% of the response from varnish were getting timedout.

Following is a snippet of json log:

{"http":{"domain":"blah_blah_blah","request_method":"GET","request_protocol_version":"1.1","browser":"Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/534.3 (KHTML
, like Gecko) Chrome/6.0.472.63 Safari/534.3","request_url":"/images/loading.gif","referrer":"http://blah_blah_blah","request_cookie":null,
,"region":"blah","organization":"blah","country_code":"blah","country_name":"blah","country_code3":"blah"},"visit_date":"2010-10-12 00:00:00","visitor_i
p":"","visit_date_block_hour":"2010-10-12 00:00:00","visitor_port":49800},**"haproxy":{"listener_queue":0,"total_time_waiting_in_queue_ms":0,"feconn":1687,"haproxy_da

As the above snippet says, varnish sent back it's with two X-Varnish header values (2021094722 and 2015028484). However it resulted in connection in termination state on haproxy.

I am really confused about this. Please help me understand, why this can happen.

share|improve this question

migrated from Dec 9 '10 at 17:16

This question came from our site for professional and enthusiast programmers.

I didn't see that post. Just for the record, "cD" flags indicate client timeout, so it's not related to varnish but to the clients (the other side). If too many clients experience a timeout, it's possible that your haproxy config is wrong (maybe too small client timeout).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.