<html style="direction: ltr;">
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <style type="text/css">body p { margin-bottom: 0cm; margin-top: 0pt; } </style>
  </head>
  <body bidimailui-charset-is-forced="true" style="direction: ltr;">
    <p>Hi,</p>
    <p><br>
    </p>
    <p>Thank you all for the great work on Squid.</p>
    <p><br>
    </p>
    <p>I got last week a bad "issue" where a squid Version 4.0.23 set to
      send requests to 4 VMs didn't detect a dead peer.</p>
    <p><br>
    </p>
    <p>On each VM are running Apache as the frontal, and php-fpm as php
      scripts execution.</p>
    <p><br>
    </p>
    <p>Squid is using sourcehash load balancing algorithm.</p>
    <p><br>
    </p>
    <p>But, if the php-fpm is down or busy, Apache will return a 504
      Gateway timeout to Squid and browser, and squid will continue to
      send requests to same Apache, even if the answer will always be
      HTTP code 504, because Apache is ALIVE.</p>
    <p><br>
    </p>
    <p>Apache is there, respawning, but the user is not getting the
      right answer.</p>
    <p><br>
    </p>
    <p>And all IPs that are connecting to this VM, will fail, so 25% of
      all users will suffer unavailability.</p>
    <p><br>
    </p>
    <p>I have setup some watchdogs scripts that will now, from the VM
      intern itself, check if there is a 504 code returned by Apache,
      and in that case, will restart php-fpm.</p>
    <p><br>
    </p>
    <p>But how to tell squid to mark dead a peer that returns 504 code ?</p>
    <p><br>
    </p>
    <p>Thanks</p>
    <p>Patrick</p>
    <p><br>
    </p>
  </body>
</html>