Rainbows! Rack HTTP server user/dev discussion
 help / color / mirror / code / Atom feed
From: Eric Wong <normalperson-rMlxZR9MS24@public.gmane.org>
To: Rainbows! list <rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org>
Subject: Re: BUG: HUP signal reloads config, but gives RuntimeError - Application has already initialized
Date: Wed, 4 Sep 2013 17:21:49 +0000	[thread overview]
Message-ID: <20130904172149.GA2713@dcvr.yhbt.net> (raw)
In-Reply-To: <410FB453-44E7-4F7D-BC29-4AA36A0C412C-rCoryE6l9AakgyF2CNKXmw@public.gmane.org>

Patrick Hanevold <patrick-rCoryE6l9AakgyF2CNKXmw@public.gmane.org> wrote:
> Why aren't you guys on github?

Because people care whether or not a project is on GitHub or not, and
that's a sign their exclusive features are leading to vendor lock-in.
Avoiding lock-in is a big reason I'm involved in Free Software/Open
Source in the first place.

> environment.rb line 5 initializes the application.
> I, [2013-09-04T13:53:52.023134 #7953]  INFO -- : reloading config_file=/home/capistrano/sites/fargekladden/current/config/rainbows.rb
> I, [2013-09-04T13:53:52.192878 #7953]  INFO -- : Refreshing Gem list
> E, [2013-09-04T13:53:52.193995 #7953] ERROR -- : error reloading config_file=/home/capistrano/sites/fargekladden/current/config/rainbows.rb: Application has been already initialized. (RuntimeError)

You're using preload_app?  This is an incompatible with SIGHUP but I
failed to document it for Rainbows! (it's documented for unicorn).

I've just pushed out the following:

Subject: [PATCH] SIGNALS: document SIGHUP/preload_app incompatibility

This was documented in the unicorn docs, but not Rainbows!
(The major difference between unicorn and Rainbows! signal
handling is the deferred handling of SIGUSR1 in unicorn vs
the immediate handling in Rainbows!)
 SIGNALS | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/SIGNALS b/SIGNALS
index 7b61172..b761ae5 100644
@@ -10,6 +10,16 @@ between \Rainbows!, Unicorn and nginx.
 === Master Process
 * HUP - reload config file, app, and gracefully restart all workers
+  If the "preload_app" directive is false (the default), then workers
+  will also pick up any application code changes when restarted.  If
+  "preload_app" is true, then application code changes will have no
+  effect; USR2 + QUIT (see below) must be used to load newer code in
+  this case.  When reloading the application, +Gem.refresh+ will
+  be called so updated code for your application can pick up newly
+  installed RubyGems.  It is not recommended that you uninstall
+  libraries your application depends on while Rainbows! is running,
+  as respawned workers may enter a spawn loop when they fail to
+  load an uninstalled dependency.
 * INT/TERM - quick shutdown, kills all workers immediately
Eric Wong
Rainbows! mailing list - rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org
Do not quote signatures (like this one) or top post when replying

      parent reply	other threads:[~2013-09-04 17:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-04 11:59 Patrick Hanevold
     [not found] ` <410FB453-44E7-4F7D-BC29-4AA36A0C412C-rCoryE6l9AakgyF2CNKXmw@public.gmane.org>
2013-09-04 17:21   ` Eric Wong [this message]

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:

  List information: https://yhbt.net/rainbows/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130904172149.GA2713@dcvr.yhbt.net \
    --to=normalperson-rmlxzr9ms24@public.gmane.org \
    --cc=rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org \
    --subject='Re: BUG: HUP signal reloads config, but gives RuntimeError - Application has already initialized' \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Rainbows! Rack HTTP server user/dev discussion

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhbt.net/rainbows-public
	git clone --mirror http://ou63pmih66umazou.onion/rainbows-public

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 rainbows-public rainbows-public/ https://yhbt.net/rainbows-public \
		rainbows-public@yhbt.net rainbows-public@bogomips.org rainbows-talk@rubyforge.org rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org
	public-inbox-index rainbows-public

Example config snippet for mirrors.
Newsgroups are available over NNTP:
 note: .onion URLs require Tor: https://www.torproject.org/

code repositories for project(s) associated with this inbox:


AGPL code for this site: git clone http://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/public-inbox.git