unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
* Unicorn_rails ignores USR2 signal
@ 2012-03-09 21:48 Yeung, Jeffrey
  2012-03-09 22:24 ` Eric Wong
  0 siblings, 1 reply; 15+ messages in thread
From: Yeung, Jeffrey @ 2012-03-09 21:48 UTC (permalink / raw)
  To: mongrel-unicorn@rubyforge.org

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2013-05-08 18:39 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-09 21:48 Unicorn_rails ignores USR2 signal Yeung, Jeffrey
2012-03-09 22:24 ` 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)

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