* unicorn 4.2.1 release soon?
@ 2012-03-22 6:30 7% Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2012-03-22 6:30 UTC (permalink / raw)
To: mongrel-unicorn
There's not much going on in unicorn.git nowadays, everything's
stabilized nicely over the past few years.
This release would mainly be for for Graham's EPERM fix/workaround for
stale pid files and some documentation fixes improvements.
Shortlog below:
Eric Wong (4):
examples/nginx.conf: remove redundant word
examples/nginx.conf: use $scheme instead of hard-coded "https"
KNOWN_ISSUES: document signal conflicts in libs/apps
log EPERM errors from invalid pid files
Graham Bleach (1):
Start the server if another user has a PID matching our stale pidfile.
$ git clone git://bogomips.org/unicorn.git
I'm also going on vacation soon, so I'll have almost no Internet access
for a few weeks. Help each other out when I'm away, thanks :)
_______________________________________________
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
^ permalink raw reply [relevance 7%]
* Re: [PATCH] Start the server if another user has a PID matching our stale pidfile.
@ 2012-03-20 20:10 6% ` Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2012-03-20 20:10 UTC (permalink / raw)
To: unicorn list
Eric Wong <normalperson@yhbt.net> wrote:
> Graham Bleach <graham@darkskills.org.uk> wrote:
> > If unicorn doesn't get terminated cleanly (for example if the machine
> > has its power interrupted) and the pid in the pidfile gets used by
> > another process, the current unicorn code will exit and not start a
> > server. This tiny patch fixes that behaviour.
>
> Thanks! Acked-by: Eric Wong <normalperson@yhbt.net>
>
> and pushed to master on git://bogomips.org/unicorn.git
Btw, I also pushed this to be a little more informative:
>From d0e7d8d770275654024887a05d9e986589ba358c Mon Sep 17 00:00:00 2001
From: Eric Wong <normalperson@yhbt.net>
Date: Tue, 20 Mar 2012 20:05:59 +0000
Subject: [PATCH] log EPERM errors from invalid pid files
In some cases, EPERM may indicate a real configuration problem,
but it can also just mean the pid file is stale.
---
lib/unicorn/http_server.rb | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lib/unicorn/http_server.rb b/lib/unicorn/http_server.rb
index 0c2af5d..ede6264 100644
--- a/lib/unicorn/http_server.rb
+++ b/lib/unicorn/http_server.rb
@@ -656,7 +656,10 @@ class Unicorn::HttpServer
wpid <= 0 and return
Process.kill(0, wpid)
wpid
- rescue Errno::ESRCH, Errno::ENOENT, Errno::EPERM
+ rescue Errno::EPERM
+ logger.info "pid=#{path} possibly stale, got EPERM signalling PID:#{wpid}"
+ nil
+ rescue Errno::ESRCH, Errno::ENOENT
# don't unlink stale pid files, racy without non-portable locking...
end
--
_______________________________________________
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
^ permalink raw reply related [relevance 6%]
Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2012-02-29 14:34 [PATCH] Start the server if another user has a PID matching our stale pidfile Graham Bleach
2012-02-29 17:25 ` Eric Wong
2012-03-20 20:10 6% ` Eric Wong
2012-03-22 6:30 7% unicorn 4.2.1 release soon? Eric Wong
Code repositories for project(s) associated with this public inbox
https://yhbt.net/unicorn.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).