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.5 required=5.0 tests=AWL,MSGID_FROM_MTA_HEADER, RP_MATCHES_RCVD shortcircuit=no autolearn=unavailable version=3.3.2 Path: news.gmane.org!not-for-mail From: Eric Wong Newsgroups: gmane.comp.lang.ruby.unicorn.general Subject: Re: Listening UNIX socket is not deleted when stopping Unicorn? Date: Sun, 27 Dec 2009 19:15:46 -0800 Message-ID: <20091228031546.GA4349@dcvr.yhbt.net> References: <200912280137.59162.ibc@aliax.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1261970161 10700 80.91.229.12 (28 Dec 2009 03:16:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 28 Dec 2009 03:16:01 +0000 (UTC) To: unicorn list Original-X-From: mongrel-unicorn-bounces@rubyforge.org Mon Dec 28 04:15:54 2009 Return-path: Envelope-to: gclrug-mongrel-unicorn@m.gmane.org X-Original-To: mongrel-unicorn@rubyforge.org Delivered-To: mongrel-unicorn@rubyforge.org Content-Disposition: inline In-Reply-To: <200912280137.59162.ibc@aliax.net> User-Agent: Mutt/1.5.18 (2008-05-17) 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:260 Archived-At: Received: from rubyforge.org ([205.234.109.19]) by lo.gmane.org with esmtp (Exim 4.50) id 1NP65J-0008KD-WE for gclrug-mongrel-unicorn@m.gmane.org; Mon, 28 Dec 2009 04:15:54 +0100 Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id C022B1779938; Sun, 27 Dec 2009 22:15:51 -0500 (EST) Received: from dcvr.yhbt.net (dcvr.yhbt.net [64.71.152.64]) by rubyforge.org (Postfix) with ESMTP id CD6F815B802E for ; Sun, 27 Dec 2009 22:15:47 -0500 (EST) Received: from localhost (unknown [127.0.2.5]) by dcvr.yhbt.net (Postfix) with ESMTP id 0CEA11F50D; Mon, 28 Dec 2009 03:15:47 +0000 (UTC) I=F1aki Baz Castillo wrote: > Hi, I listen into an UNIX socket but after stopping Unicorn the socket > is not removed. Is it the expected behavior? Yes. Otherwise it's subject to race conditions where the socket owned by a new/replacement process gets its socket unlinked. Currently Unicorn unlinks any existing socket on the FS before attempting to bind to it for the following reasons: * I consider this less error-prone, especially when people aren't storing sockets in a directory that's cleared on reboots (like /tmp). * This can also be desirable behavior since it can be used to do transparent upgrades/binary replacements in cases where it's less convenient to use USR2+QUIT, if you're switching between Ruby installations for example. > This causes problem of permissions when changing the user/group > running the workers (as they cannot remove the old socket with > different owner). Since there's absolutely no point in running Unicorn on port 80/443, you should just avoid user switching entirely since it'll significantly simplify your setup(s). -- = Eric Wong _______________________________________________ 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