Rainbows! Rack HTTP server user/dev discussion
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* Re: BUG: HUP signal reloads config, but gives RuntimeError - Application has already initialized
       [not found]     ` <410FB453-44E7-4F7D-BC29-4AA36A0C412C-rCoryE6l9AakgyF2CNKXmw@public.gmane.org>
@ 2013-09-04 17:21  7%   ` Eric Wong
  0 siblings, 0 replies; 1+ results
From: Eric Wong @ 2013-09-04 17:21 UTC (permalink / raw)
  To: Rainbows! list

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
--- a/SIGNALS
+++ b/SIGNALS
@@ -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
http://rubyforge.org/mailman/listinfo/rainbows-talk
Do not quote signatures (like this one) or top post when replying


^ permalink raw reply related	[relevance 7%]

Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2013-09-04 11:59     BUG: HUP signal reloads config, but gives RuntimeError - Application has already initialized Patrick Hanevold
     [not found]     ` <410FB453-44E7-4F7D-BC29-4AA36A0C412C-rCoryE6l9AakgyF2CNKXmw@public.gmane.org>
2013-09-04 17:21  7%   ` Eric Wong

Code repositories for project(s) associated with this public inbox

	https://yhbt.net/rainbows.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).