Unicorn and HAProxy, 500 Internal errors after checks

Pierre oct at fotopedia.com
Wed Dec 1 06:59:31 EST 2010


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. I think Unicorn should refrain from
sending an error in this case. There is no visible side effect,
excepted that there are a "lot" of 500s running on the wire that
nobody will ever read. Also, these errors are not sent in the Unicorn
log, making it quite difficult to understand what's going on :-)

Pierre <oct at fotopedia.com>
Server Shepherd at http://www.fotopedia.com/

More information about the mongrel-unicorn mailing list