unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: Eric Wong <e@80x24.org>
To: Mike Perham <mike@perham.net>
Cc: unicorn-public@yhbt.net
Subject: Re: thread dump?
Date: Thu, 11 May 2023 19:01:05 +0000	[thread overview]
Message-ID: <20230511190105.M303527@dcvr> (raw)
In-Reply-To: <b7ef50c1-d7ca-48d4-badf-7d3fe5bb13cd@app.fastmail.com>

Mike Perham <mike@perham.net> wrote:
> On Thu, May 11, 2023, at 07:42, Mike Perham wrote:
> > Hi, is there a way to get a thread dump for a Unicorn
> > process? I have a Unicorn which is hanging[0] and I can't
> > tell where it is stuck. Sidekiq uses the TTIN (Thread INfo)
> > signal, Puma uses the INFO signal[1]. Does unicorn have
> > similar?

(top-posting corrected)

Not by default.  I've long recommended adding per-callsite timeouts
throughout the app + libraries for portability across various
Rack servers:

  https://yhbt.net/unicorn/Application_Timeouts.html

> > [0]: https://github.com/sidekiq/sidekiq/issues/5876#issuecomment-1529919584
> > [1]: https://github.com/puma/puma/pull/1320
> 
> FYI, I got this working with some easy-on-eyes formatting:
> 
> after_fork do |server, worker|
>     Signal.trap("INFO") do

<snip>

Yes, that works.  Pretty much anything can be setup that way,
and at this point there's probably many configs that would be
broken if unicorn started relying on more signals internally.



note to all: disable HTML and use reply-to-all to ensure archival to
https://yhbt.net/unicorn-public/ et al. for future readers.
subscribers: there's a one-click List-Unsubscribe URL in the headers

      reply	other threads:[~2023-05-11 19:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-11 14:42 thread dump? Mike Perham
2023-05-11 18:25 ` Mike Perham
2023-05-11 19:01   ` Eric Wong [this message]

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=20230511190105.M303527@dcvr \
    --to=e@80x24.org \
    --cc=mike@perham.net \
    --cc=unicorn-public@yhbt.net \
    /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).