unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: Eric Wong <normalperson@yhbt.net>
To: unicorn list <mongrel-unicorn@rubyforge.org>
Subject: Re: Unicorn completely ignores USR2 signal
Date: Wed, 6 Jul 2011 17:42:16 +0000	[thread overview]
Message-ID: <20110706174216.GA1733@dcvr.yhbt.net> (raw)
In-Reply-To: <CAEY6bkrA5-McJ2jJJof5EYuf3HoNzLXNC_2YJbDbV2hN1O4U2A@mail.gmail.com>

Ehud Rosenberg <ehudros@gmail.com> wrote:
> Hi all,
> I'm experiencing a rather strange problem with unicorn on my production server.
> Although the config file states preload_app true, sending USR2 to the
> master process does not generate any response, and it seems like
> unicorn is ignoring the signal altogether.
> On another server sending USR2 changes the master process to and (old)
> state and starts a new master process successfully.
> The problematic server is using RVM & bundler, so I'm assuming it's
> somehow related (the other one is vanilla ruby).

RVM could be a problem, especially if your ENV changed somehow and your
path to.  Can you dump out the START_CTX and ENV contents in the
before_exec hook?

  before_exec do |server|
    File.open("/tmp/start_ctx.dump", "ab") do |fp|
      PP.pp Unicorn::HttpServer::START_CTX, fp
      PP.pp ENV, fp
    end
  end

You may need to modify START_CTX if you're changing paths or if
somehow RVM gave you the wrong path to unicorn

START_CTX is documented here:
  http://unicorn.bogomips.org/Unicorn/HttpServer.html

> Sending signals other than USR2 (QUIT, HUP) works just fine.
> Is there a way to trace what's going on behind the scenes here?

Run strace (Linux) or equivalent on the master process.

> Unicorn's log file is completely empty.

This is the log you setup to point to stderr_path?  That shouldn't
happen...

-- 
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


  reply	other threads:[~2011-07-06 17:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-06 10:21 Unicorn completely ignores USR2 signal Ehud Rosenberg
2011-07-06 17:42 ` Eric Wong [this message]
2011-07-07 14:18   ` Eric Wong
2011-07-07 17:52     ` Alex Sharp
2011-07-07 23:02   ` Ehud Rosenberg

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=20110706174216.GA1733@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).