Unicorn and HAProxy, 500 Internal errors after checks

Eric Wong normalperson at yhbt.net
Wed Dec 1 11:52:07 EST 2010

Pierre <oct at fotopedia.com> wrote:
> Hi,
> This morning, while checking for a correct deployment, we found out
> that the Unicorns we are using were sending 500 Internal errors very
> frequently to the HAProxy that sits in front of them. After some
> investigation, It turned out that HAProxy checks the backend by
> opening and closing a connection to the unicorn. Unfortunately the
> Unicorns we use ( v 0.990.0 ) will try to reply to this probe by a
> 500, resulting in the error being sent to the HAProxy when the proxy
> has already close the connection.

Hi Pierre, HAProxy should be configured to send proper HTTP checks and
not just TCP connection checks, the problem will go away then.  Also, I
can not recommend HAProxy unless you're certain all your clients are on
a LAN and can be trusted to never trickle uploads nor reading large

Eric Wong

More information about the mongrel-unicorn mailing list