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=AWL,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: Jamie Wilkinson Newsgroups: gmane.comp.lang.ruby.unicorn.general Subject: Re: synchronous restart Date: Tue, 31 Aug 2010 13:08:52 -0700 Message-ID: References: <9ADECA6F-ED48-467D-8826-2C94BF42B18A@tramchase.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1283285345 19451 80.91.229.12 (31 Aug 2010 20:09:05 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 31 Aug 2010 20:09:05 +0000 (UTC) To: unicorn list Original-X-From: mongrel-unicorn-bounces@rubyforge.org Tue Aug 31 22:09:02 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:received:received:sender:content-type :mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=wG40mKN/Zqf2nLWPnUJzeacIob/69WlIcc/vpOZCrWY=; b=tOjGHq/qgteNFKIB2othCDflutfjLYBagZS4UpPWzhbKejt9Ao1nDtmLTMgj7XoVRs cWK/VbhCNemVAXnfbcl/ZVlo+qVp9t+Nq+2tVZD6pE/ajJMXza7VnYFebjDJvRwWUiyI AFG5Njo08kjc2PSNaqFtRX9MFy6ogflarwk1w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; b=O9cqHaNAjJe9IwJuUxsud5ceCJ0cECfYSY+4q/HOd30ZfTxe3X53IfMcAk+QTMnmJ7 L3/Rg543QaiwyKpagb6vPPUJw58EmaufK7zWFpLaCQEVkUUWoMi6P4CIv/1KLtdvZEUO fUpxLt58lPCMNA4ikc+Ea/aKHgHCRrA2YM35k= In-Reply-To: X-Mailer: Apple Mail (2.1081) 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:695 Archived-At: Received: from rubyforge.org ([205.234.109.19]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OqX8g-0003zw-2n for gclrug-mongrel-unicorn@m.gmane.org; Tue, 31 Aug 2010 22:09:02 +0200 Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 29C2C185836F; Tue, 31 Aug 2010 16:09:01 -0400 (EDT) Received: from mail-pw0-f50.google.com (mail-pw0-f50.google.com [209.85.160.50]) by rubyforge.org (Postfix) with ESMTP id 167071858368 for ; Tue, 31 Aug 2010 16:08:55 -0400 (EDT) Received: by pwi4 with SMTP id 4so3557900pwi.23 for ; Tue, 31 Aug 2010 13:08:55 -0700 (PDT) Received: by 10.115.14.6 with SMTP id r6mr429870wai.8.1283285335265; Tue, 31 Aug 2010 13:08:55 -0700 (PDT) Received: from [10.0.1.31] (173-13-169-18-sfba.hfc.comcastbusiness.net [173.13.169.18]) by mx.google.com with ESMTPS id d39sm17026365wam.4.2010.08.31.13.08.54 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 31 Aug 2010 13:08:54 -0700 (PDT) On Aug 31, 2010, at 12:08 PM, Clifton King wrote: > If the new master process > fails at booting, you can tail the unicorn.stdout/err.log files to see > why. I should clarify... the above is exactly what I'm trying to avoid. i.e. how do you know if your new master failed to boot unless you are actively tailing the logs? It is extremely infrequent that our unicorns fail to start, but when it does we sometimes don't notice for quite some time. Our unicorns also restart so quickly that it is not an issue to do the restarts synchronously during deployment and trade speed for peace of mind I will probably just replace our basic `kill -USR2` with a small script that sends the signal and doesn't exit until the pidfile handover is complete. I'll be sure to share my results in case anyone else might find this useful. -jamie http://jamiedubs.com | http://fffff.at > On Tue, Aug 31, 2010 at 1:30 PM, Jamie Wilkinson wrote: >> Has anyone tried to synchronously restart their unicorns, to ensure that things restart OK? >> >> I imagine I could write a script that sent USR2 and then watched the log for a successful before exiting, but I dream there is something more MAGICAL >> >> >> Yours in mythical web servers, >> >> -jamie >> >> _______________________________________________ >> 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 _______________________________________________ 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