From: Eric Wong <normalperson@yhbt.net>
To: unicorn list <mongrel-unicorn@rubyforge.org>
Cc: Laurens Pit <laurens.pit@mirror42.com>
Subject: Re: Should USR2 always work?
Date: Mon, 21 Nov 2011 17:16:31 -0800 [thread overview]
Message-ID: <20111122011631.GA20110@dcvr.yhbt.net> (raw)
In-Reply-To: <F2C54DC9-D848-4ECF-8A6E-6E20D95A58CD@mirror42.com>
Laurens Pit <laurens.pit@mirror42.com> wrote:
> I didn't expect that to be the case, but in the past year occasionally
> I've experienced I had to resort to QUIT and start all over in order
> to get all components loaded correctly.
>
> Specifically: yesterday I upgraded several projects to rails 3.0.11
> and added a new i18n .yml file in the config dir. After the USR2 QUIT
> sequence all new code seemed to work fine. Except the new .yml file
> wasn't loaded. Another run of USR2 and QUIT didn't resolve it. Only
> after QUIT and start of unicorn was the new .yml file loaded.
>
> This was not just on one machine, which might have been a fluke. This
> was on all machines for all projects, consistently.
>
> Any ideas?
Anything from stderr log files? USR2 will fail if there's
* compile/load error when loading the app (if preload_app=true)
* unicorn/unicorn_rails executable script is missing
(maybe Bundler is moving it?)
* Ruby installation got moved/shifted/changed
* Working directory got _moved_ (cap may cycle those out)
You can set "working_directory" in your unicorn config
to work around it.
(and maybe other reasons I can't think of right now)
Come to think of it, the missing working directory case
could be the most common...
But stderr log files (stderr_path) should always tell you what's
going on.
== Linux(-only?) tip:
If the log files got deleted somehow, you may still be able to read it
via: "cat /proc/$PID/fd/2" on either the PID of the master or _any_
worker process.
To read some other log files, you can just replace the "2" with whatever
file descriptor. Reading the symlinks ("ls -l /proc/$PID/fd/") will
tell you where each descriptor is pointed to, even if it is a deleted
file.
_______________________________________________
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
next prev parent reply other threads:[~2011-11-22 1:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-21 23:14 Should USR2 always work? Laurens Pit
2011-11-22 1:16 ` Eric Wong [this message]
2011-11-22 1:55 ` Lawrence Pit
2011-11-22 3:00 ` Eric Wong
2011-11-23 5:31 ` Lawrence Pit
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=20111122011631.GA20110@dcvr.yhbt.net \
--to=normalperson@yhbt.net \
--cc=laurens.pit@mirror42.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).