title: haproxy 504 timeout to apache
body: <p>Very new to haproxy and loving it, apart from a 504 issue that we're getting. The relevant log output is:</p>
  
  <pre><code>Jun 21 13:52:06 localhost haproxy[1431]: 192.168.0.2:51435 [21/Jun/2017:13:50:26.740] www-https~ beFootprints/foorprints 0/0/2/-1/100003 504 195 - - sH-- 2/2/0/0/0 0/0 "POST /MRcgi/MRlogin.pl HTTP/1.1"
  Jun 21 13:54:26 localhost haproxy[1431]: 192.168.0.2:51447 [21/Jun/2017:13:52:46.577] www-https~ beFootprints/foorprints 0/0/3/-1/100005 504 195 - - sH-- 2/2/0/0/0 0/0 "POST /MRcgi/MRlogin.pl HTTP/1.1"
  Jun 21 14:15:57 localhost haproxy[1431]: 192.168.0.1:50225 [21/Jun/2017:14:14:17.771] www-https~ beFootprints/foorprints 0/0/2/-1/100004 504 195 - - sH-- 3/3/0/0/0 0/0 "POST /MRcgi/MRlogin.pl HTTP/1.1"
  Jun 21 14:22:26 localhost haproxy[1431]: 192.168.0.1:50258 [21/Jun/2017:14:20:46.608] www-https~ beFootprints/foorprints 0/0/2/-1/100003 504 195 - - sH-- 2/2/0/0/0 0/0 "POST /MRcgi/MRlogin.pl HTTP/1.1" 
  </code></pre>
  
  <p>Using the following timeout values in the haproxy.cfg</p>
  
  <pre><code>defaults
          log     global
          mode    http
          option forwardfor
          option  httplog
          option  dontlognull
          timeout connect 5000
          timeout client  50000
          timeout server  100000
  </code></pre>
  
  <p>Running on Ubuntu 16.04.2 LTS</p>
  
  <p>Any help and comment very much appreciated!</p>