From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS33070 50.56.128.0/17 X-Spam-Status: No, score=0.5 required=5.0 tests=AWL,FREEMAIL_FROM,RDNS_NONE, T_DKIM_INVALID shortcircuit=no autolearn=no version=3.3.2 X-Original-To: archivist@yhbt.net Delivered-To: archivist@dcvr.yhbt.net Received: from rubyforge.org (unknown [50.56.192.79]) by dcvr.yhbt.net (Postfix) with ESMTP id 1FAD7202B4 for ; Tue, 26 Nov 2013 04:55:40 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id EB18726202D; Tue, 26 Nov 2013 04:55:39 +0000 (UTC) X-Original-To: mongrel-unicorn@rubyforge.org Delivered-To: mongrel-unicorn@rubyforge.org Received: from mail-ob0-f169.google.com (mail-ob0-f169.google.com [209.85.214.169]) by rubyforge.org (Postfix) with ESMTP id 1B8B426202D for ; Tue, 26 Nov 2013 04:55:32 +0000 (UTC) Received: by mail-ob0-f169.google.com with SMTP id wm4so5326219obc.28 for ; Mon, 25 Nov 2013 20:55:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=rnoImTyzIwWnymECm+HxaU4DPx9yk/Wcd6s1uNUF5hI=; b=Kf3r7fFdiK9wRh5nNOmFLe+rUZkhLGdWfa7Ef3O1MxhuKPpmTJIA+2s4N2Ua/rOqAM BNPmzGG1UH429lEXGTTVf8ZO3BerBIIZ7roDPo2l6ir4Vtzl5xmjASlfFsqW/biPd6pl D3fufErJJ9sPC+3HIXBiBfU0XxnMBo8Oo4UDDzq4DJEvMP+mkjdbMVyS2OuugjMmNU47 qDpW2ftuowv1RuwFi8aNuQuntVTljrzEngyy+KnpD1FIt/neiOiY4Wom1Dhulsc6iaFe 6tCHZu2o0AyiZ++KEXJ8eegFtK60G/n4wReo7PbDzDcGsQRwoDIYHrWlmSH/wAS9sKxN Mdkw== MIME-Version: 1.0 X-Received: by 10.182.65.36 with SMTP id u4mr28004020obs.31.1385441732401; Mon, 25 Nov 2013 20:55:32 -0800 (PST) Received: by 10.182.128.42 with HTTP; Mon, 25 Nov 2013 20:55:32 -0800 (PST) In-Reply-To: References: Date: Tue, 26 Nov 2013 15:55:32 +1100 Message-ID: Subject: Re: Issues with PID file renaming From: Jimmy Soho To: unicorn list 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: mongrel-unicorn-bounces@rubyforge.org Errors-To: mongrel-unicorn-bounces@rubyforge.org On Tue, Nov 26, 2013 at 12:42 PM, Michael Fischer wrote: > I'd suggest that you monitor Unicorn by issuing a test request to it > via its listening socket instead. Ultimately, you're more likely > concerned about whether Unicorn is serving requests, not whether its > pid file exists. (Such a check can also lead to false positives; > consider what might happen if an admin or the Linux OOM killer sends > it a SIGKILL, leaving the pid file intact.) Great suggestion, thanks. I've added that, as shown below, in case others are interested. Though perhaps not necessary, am still checking the PID file as well so it will start asap on absence of the pid file. @Eric: Thanks for that change. check process unicorn with pidfile /srv/app.example.com/shared/pids/unicorn.pid group web start program = "/etc/init.d/unicorn start" stop program = "/etc/init.d/unicorn stop" if mem > 300.0 MB for 1 cycles then restart if cpu > 50% for 2 cycles then alert if cpu > 80% for 3 cycles then restart if failed unixsocket /tmp/.unicorn_sock type tcp protocol http and request '/ping' hostheader 'app.example.com' with timeout 20 seconds for 2 cycles then restart -- Jimmy _______________________________________________ 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