From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS14383 205.234.109.0/24 X-Spam-Status: No, score=-0.6 required=5.0 tests=FREEMAIL_FROM, MSGID_FROM_MTA_HEADER,RP_MATCHES_RCVD,T_DKIM_INVALID shortcircuit=no autolearn=unavailable version=3.3.2 Path: news.gmane.org!not-for-mail From: Clifton King Newsgroups: gmane.comp.lang.ruby.unicorn.general Subject: Re: Unicorn and HAProxy, 500 Internal errors after checks Date: Wed, 1 Dec 2010 10:12:37 -0600 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1291222067 6274 80.91.229.12 (1 Dec 2010 16:47:47 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 1 Dec 2010 16:47:47 +0000 (UTC) To: unicorn list Original-X-From: mongrel-unicorn-bounces@rubyforge.org Wed Dec 01 17:47:43 2010 Return-path: Envelope-to: gclrug-mongrel-unicorn@m.gmane.org X-Original-To: mongrel-unicorn@rubyforge.org Delivered-To: mongrel-unicorn@rubyforge.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:reply-to :in-reply-to:references:date:message-id:subject:from:to:content-type; bh=XJ//RUeuQIn7g+KP87QyEcqWFXbqc3U5bubG2S46CGI=; b=LhYjubP+5y9VuOjk9GYEEL6OiHua4GPXfI28NB1PcqX9PwA3Sod9iFxwzpipz6zjJI Xo/cgJpaSQKnMv22SXFls9AmweAcz7Gj7OUOIiu9i9H/jHw7B36AysNd1WdeIYpWvDwG 7hUdT9wcnpVcdSXWhoRdShP3MNIlMh1Jt8V+U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:content-type; b=rFJs6FVMR3NRljBzvgb/BaNIGgQUzzPzhvThwDxVU4gL/7vzaiPRoRIs+NXs6RFd+t QLeS3yXCslqiKWLUPFvDu2x78DM/9EWPkmkSc+FmohI8Z/o+7HliQuClw3xCn4SX2+Em M8KnLPni0gtLuU3AmfQx21jG1O7JHhvI+EtKQ= In-Reply-To: X-BeenThere: mongrel-unicorn@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: mongrel-unicorn-bounces@rubyforge.org Errors-To: mongrel-unicorn-bounces@rubyforge.org Xref: news.gmane.org gmane.comp.lang.ruby.unicorn.general:769 Archived-At: Received: from rubyforge.org ([205.234.109.19]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PNpqJ-000382-08 for gclrug-mongrel-unicorn@m.gmane.org; Wed, 01 Dec 2010 17:47:43 +0100 Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 8D5C31858378; Wed, 1 Dec 2010 11:47:39 -0500 (EST) Received: from mail-qy0-f178.google.com (mail-qy0-f178.google.com [209.85.216.178]) by rubyforge.org (Postfix) with ESMTP id 6CEE01858300 for ; Wed, 1 Dec 2010 11:12:38 -0500 (EST) Received: by qyk33 with SMTP id 33so7728675qyk.2 for ; Wed, 01 Dec 2010 08:12:38 -0800 (PST) Received: by 10.229.215.213 with SMTP id hf21mr7450514qcb.189.1291219957557; Wed, 01 Dec 2010 08:12:37 -0800 (PST) Received: by 10.220.191.7 with HTTP; Wed, 1 Dec 2010 08:12:37 -0800 (PST) Pierre, Any specific reason you're using HAProxy for Unicorn? Clifton On Wed, Dec 1, 2010 at 5:59 AM, Pierre 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. 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 :-) > > Cheers, > -- > Pierre > Server Shepherd at http://www.fotopedia.com/ > _______________________________________________ > Unicorn mailing list - mongrel-unicorn@rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-unicorn > Do not quote signatures (like this one) or top post when replying > _______________________________________________ Unicorn mailing list - mongrel-unicorn@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-unicorn Do not quote signatures (like this one) or top post when replying