unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: Eric Wong <e@80x24.org>
To: Dan Moore <dan@vaporwa.re>
Cc: unicorn-public@bogomips.org
Subject: Re: SIGWINCH ignored...
Date: Tue, 19 May 2015 23:28:58 +0000	[thread overview]
Message-ID: <20150519232858.GA23515@dcvr.yhbt.net> (raw)
In-Reply-To: <etPan.555b4293.5b47a5b7.e617@danbookpro>

Don't send HTML parts, it is flagged as spam and nearly lost.

Onto your question...

Dan Moore <dan@vaporwa.re> wrote:
> I’m interested in the SIGWINCH signal and specifically the message
> that is posted to the console at an INFO level instead of DEBUG level:
> https://github.com/ddollar/foreman/issues/557
> “INFO – : SIGWINCH ignored because we’re not daemonized”

I wrote this patch a while ago to a private bug reporter (via
unicorn@bogomips.org) back in July 2013, but apparently it
was forgotten:

--- a/lib/unicorn/http_server.rb
+++ b/lib/unicorn/http_server.rb
@@ -294,13 +294,13 @@ class Unicorn::HttpServer
       when :USR2 # exec binary, stay alive in case something went wrong
         reexec
       when :WINCH
-        if Unicorn::Configurator::RACKUP[:daemonized]
+        if $stdin.tty?
+          logger.info "SIGWINCH ignored because we're not daemonized"
+        else
           respawn = false
           logger.info "gracefully stopping all workers"
           soft_kill_each_worker(:QUIT)
           self.worker_processes = 0
-        else
-          logger.info "SIGWINCH ignored because we're not daemonized"
         end
       when :TTIN
         respawn = true

I don't recall it breaks anything, so perhaps it's a good change to make
for unicorn 5.

> I would like to request that
> this be moved to DEBUG level as it’s quite chatty when using tmux,
> foreman, and terminal.

I don't think using DEBUG is a good idea to hack around a problem,
but rather detecting whether stdin is a TTY as above is a better check.

The archives are also mirrored to gmane.org and mail-archive.com,
so they should be searchable from either of those.

> I apologize if this was already discussed, but
> I cannot seem to perform a full search on the email archives.

The mailing list archives are cloneable via git:
  git clone --bare git://bogomips.org/unicorn-public/

And the tree layout is described at:
  http://ssoma.public-inbox.org/ssoma_repository.txt
  (it's not meant to be cloned without --bare)

You can currently use the ssoma command-line (at ssoma.public-inbox.org)
tool to import the archives into a mbox/maildir and search using tools
such as mairix/notmuch/etc...

The existing HTML archives at http://bogomips.org/unicorn-public/ should
be easily crawlable by search engines (no JS, frames, CSS or images),
but a Xapian-based search might happen in the future (that would also
help with maintaining stable IDs for read-only NNTP support).


  reply	other threads:[~2015-05-19 23:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-19 14:02 SIGWINCH ignored Dan Moore
2015-05-19 23:28 ` Eric Wong [this message]
     [not found] ` <861658785.98319.1432078146036.JavaMail.mobile-sync@ioii68>
2015-05-20  1:02   ` Dan Moore
2015-05-20 23:11     ` Eric Wong

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=20150519232858.GA23515@dcvr.yhbt.net \
    --to=e@80x24.org \
    --cc=dan@vaporwa.re \
    --cc=unicorn-public@bogomips.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).