From: Eric Wong <normalperson@yhbt.net>
To: unicorn list <mongrel-unicorn@rubyforge.org>
Subject: Re: "unicorn -D" always returns 0 "success" (even when failed to load)
Date: Thu, 24 Dec 2009 11:34:33 -0800 [thread overview]
Message-ID: <20091224193433.GB14191@dcvr.yhbt.net> (raw)
In-Reply-To: <200912241030.02160.ibc@aliax.net>
Iñaki Baz Castillo <ibc@aliax.net> wrote:
> El Miércoles, 23 de Diciembre de 2009, Eric Wong escribió:
> However I'm building my app now and when start it it usually has errors, and
> that's good as it means I'm working :)
> But sincerelly I would like to see the error just once rather than many times
> due to workers respawn :)
>
> Also, is there any "interval" parameter so a worker is not re-spawned until
> such timeout (after die).
You can sleep in the before_fork hook.
> Well, in fact I want to code some console utility to get information from the
> application (loaded configuration, check the database(s) connection and so).
> For that I was thinking in a DRb server running in the master because it must
> bind in some TCP port.
DRb can bind to UNIX domain sockets, too. But ask yourself:
Is your app really so broken that you always need DRb running on it?
You may also want to checkout Hijack, I haven't used/needed it myself,
but it could be interesting if an app is really in a lot of trouble:
http://www.rubyinside.com/hijack-get-a-live-irb-prompt-for-any-existing-ruby-process-2232.html
> The problem is that I should stop the DRb server before master reexec to avoid
> EADDINUSE. Well, I could code some rescue block...
rescuing EADDRINUSE in a loop is also how the "listen" directive
implements the :tries/:delay parameters.
> > $ rackup -h
> ...
> > -D, --daemonize run daemonized in the background
>
> Why "daemonize" is not present in unicornf configuration file?
Mainly it was cleaner and easier to test/implement it the way it is now.
It's also easier for somebody testing a setup to toggle it from the
command line.
I actually didn't want to support --daemonize at all since setsid(8),
is standard most GNU/Linux distros nowadays, but we support more than
just GNU/Linux.
> Really thanks a lot for all your help.
No problem.
--
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
next prev parent reply other threads:[~2009-12-24 19:34 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-23 2:20 "unicorn -D" always returns 0 "success" (even when failed to load) Iñaki Baz Castillo
2009-12-23 7:26 ` Eric Wong
2009-12-23 10:22 ` Iñaki Baz Castillo
2009-12-23 20:35 ` Eric Wong
2009-12-24 9:30 ` Iñaki Baz Castillo
2009-12-24 19:34 ` Eric Wong [this message]
2009-12-25 22:09 ` Iñaki Baz Castillo
2009-12-26 1:30 ` Iñaki Baz Castillo
2009-12-25 23:58 ` Iñaki Baz Castillo
-- strict thread matches above, loose matches on Subject: below --
2009-12-26 4:29 Iñaki Baz Castillo
2009-12-26 6:16 ` Eric Wong
2009-12-26 15:47 ` Iñaki Baz Castillo
2009-12-26 18:23 ` Iñaki Baz Castillo
2009-12-27 1:31 ` Eric Wong
2009-12-27 3:06 ` Iñaki Baz Castillo
2009-12-27 3:07 ` Iñaki Baz Castillo
2009-12-28 3:29 ` Eric Wong
2009-12-28 10:39 ` Iñaki Baz Castillo
2009-12-28 12:50 ` Iñaki Baz Castillo
2009-12-28 19:25 ` Eric Wong
2009-12-28 20:17 ` Iñaki Baz Castillo
2009-12-28 20:32 ` Eric Wong
2009-12-28 20:41 ` Iñaki Baz Castillo
2009-12-29 0:17 ` Eric Wong
2009-12-29 0:32 ` Iñaki Baz Castillo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://yhbt.net/unicorn/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091224193433.GB14191@dcvr.yhbt.net \
--to=normalperson@yhbt.net \
--cc=mongrel-unicorn@rubyforge.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).