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 B51F544C1C0 for ; Tue, 26 Nov 2013 01:08:26 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id F205C26202D; Tue, 26 Nov 2013 01:08:25 +0000 (UTC) X-Original-To: mongrel-unicorn@rubyforge.org Delivered-To: mongrel-unicorn@rubyforge.org X-Greylist: delayed 4212 seconds by postgrey-1.31 at rubyforge; Tue, 26 Nov 2013 01:00:41 UTC Received: from mail-ob0-f171.google.com (mail-ob0-f171.google.com [209.85.214.171]) by rubyforge.org (Postfix) with ESMTP id E3C7826202D for ; Tue, 26 Nov 2013 01:00:41 +0000 (UTC) Received: by mail-ob0-f171.google.com with SMTP id wp18so5074717obc.16 for ; Mon, 25 Nov 2013 17:00:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=rJM+pBHPiMCQbWhmWRV1cUrUUrStRXYSuDlNvDpCvP4=; b=S41mdgcLQZQJrJi2oIb8VJqEpdsjSLAcc65TVjyzyQgQ+JmBoZv25eZIp0yy2VyKE4 cNfGDI2n+i7S1MQwU0wgbPcboc3jgp4AsF805Sb/Pr0iFbeynkHuhw/Z7V5dmizoe4va KwWMJ2fyuWGDR8/sOE+ixHj3l8xmw86O61UdcAEimwspjdTXF9Lei/BznMBCkroKm1st nGHL/CKcEWWnomuYuKh5uCbfLsMRJPrThsvCBGZ9NmkfENnK+r517GyS4JHQYQs9yt30 5F0VL/lQKCEcqyYDc9xX1419Y2GtHmyhig7lbmazVFGjYXKa3N2kLHpDNs7sgpKLV3AR gBSA== MIME-Version: 1.0 X-Received: by 10.182.166.40 with SMTP id zd8mr26863347obb.25.1385427641484; Mon, 25 Nov 2013 17:00:41 -0800 (PST) Received: by 10.182.128.42 with HTTP; Mon, 25 Nov 2013 17:00:41 -0800 (PST) Date: Tue, 26 Nov 2013 12:00:41 +1100 Message-ID: Subject: Issues with PID file renaming From: Jimmy Soho To: mongrel-unicorn 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 Hi Eric, Since we upgraded from 4.6.2 to 4.7.0 we're regularly having issues where one or more unicorn master processes would not upgrade correctly, resulting in an (old) master process. What I notice is the following: when upgrading with 4.6.2 the file unicorn.pid is copied to unicorn.pid.oldbin and the unicorn.pid file is updated (the (new) master process). After a while the worker pid files are updated and the unicorn.pid.oldbin file disappears, and all is fine. When upgrading with 4.7.0 though the file unicorn.pid.oldbin is created, but there is no unicorn.pid file. After a while (when the new master process has finished initialising, and is ready to fork the workers) the worker pid files are updated and a unicorn.pid file appears, and then the unicorn.pid.oldbin file disappears. So there is a relatively long period where there is no unicorn.pid file. I think the problem for us is caused by monit, our process monitor, which monitors the unicorn.pid file: check process unicorn with pidfile /srv/app.itrp-staging.com/shared/pids/unicorn.pid start program = "/etc/init.d/unicorn start" stop program = "/etc/init.d/unicorn stop" ... Because the unicorn.pid file is absent for a relatively long period monit will try to start unicorn, while an upgrade is in progress. (which might be another issue: the start action should recognise a start or upgrade process is already underway; sadly this check too relies on the existence of the unicorn.pid file) I think the way 4.6.2 worked is better. There should be a pid file for the new master process the moment it's created. What do you think? -- Jim _______________________________________________ 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