unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: "Yeung, Jeffrey" <Jeffrey.Yeung@polycom.com>
To: "mongrel-unicorn@rubyforge.org" <mongrel-unicorn@rubyforge.org>
Subject: Unicorn_rails ignores USR2 signal
Date: Fri, 9 Mar 2012 13:48:26 -0800	[thread overview]
Message-ID: <E8D9E7CCC2621343A0A3BB45E8DEDFA91C6738D58E@CRPMBOXPRD04.polycom.com> (raw)

Hi,

I have a problem with one of my Rails servers where the daemonized unicorn_rails master seems to completely ignores the USR2 signal (only).

First, about the environment.  I've searched for solutions to this problem for several day now, and my situation appears to differ from most in that my environment is not using RVM, bundler, Capistrano, or other sandboxing tools.  It's a fairly plain jane Rails deployment.  The OS is 64-bit Ubuntu 10.04 server.

 $ uname -a
 Linux 2.6.32-37-server #81-Ubuntu SMP Fri Dec 2 20:49:12 UTC 2011 x86_64 GNU/Linux
 $ lsb_release -a
 No LSB modules are available.
 Distributor ID: Ubuntu
 Description:    Ubuntu 10.04.4 LTS
 Release:        10.04
 Codename:       lucid
 $ ruby -v
 ruby 1.9.1p376 (2009-12-07 revision 26041) [x86_64-linux]

The Rails gem version is 2.3.14.  Unicorn gem version 4.2.0.

The Unicorn config includes "preload_app true".  We use the same Unicorn configs on similar servers and for some yet unknown reason, this one is seeing a problem with USR2.

I have done my best to debug it using strace and the stderr logs.  The unicorn_rails master process handles HUP, QUIT, and USR1 signals as expected, no problems.  However, the USR2 signal is being completely ignored.

I added a before_exec block in the Unicorn conf with some puts statements, but this hook never gets called (unlike the before_fork and after_fork hooks, which are working fine for me).

 before_exec do |server|
   $stderr.puts("DEBUG before_exec")
   $stderr.puts(ENV.inspect)
   $stderr.puts(Unicorn::HttpServer::START_CTX.inspect)
 end

While monitoring the master with strace, there are no calls observed when sending a kill -USR2.  Nothing is logged to STDERR when sending this signal, either.

This has me completely stymied with the lack of logging info.  Does anyone have any clues that can point me in the right direction?

-Jeff
_______________________________________________
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:[~2012-03-09 22:05 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-09 21:48 Yeung, Jeffrey [this message]
2012-03-09 22:24 ` Unicorn_rails ignores USR2 signal Eric Wong
2012-03-09 22:39   ` Yeung, Jeffrey
2012-03-10  0:02     ` Eric Wong
2012-03-10  1:07       ` Yeung, Jeffrey
2012-03-10  1:30         ` Eric Wong
2012-03-12 21:21           ` Eric Wong
2012-03-12 22:39             ` Yeung, Jeffrey
2012-03-12 22:44               ` Eric Wong
2012-03-20 19:57                 ` Eric Wong
2012-03-20 23:09                   ` Yeung, Jeffrey
2012-03-21  2:27                     ` Devin Ben-Hur
2012-03-30 22:16                   ` Yeung, Jeffrey
2012-03-30 22:51                     ` Alex Sharp
2013-05-08 18:15                       ` Ryan Jones (RyanonRails)

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=E8D9E7CCC2621343A0A3BB45E8DEDFA91C6738D58E@CRPMBOXPRD04.polycom.com \
    --to=jeffrey.yeung@polycom.com \
    --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).