unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: "Mike Perham" <mike@perham.net>
To: unicorn-public@yhbt.net
Subject: Re: thread dump?
Date: Thu, 11 May 2023 11:25:21 -0700	[thread overview]
Message-ID: <b7ef50c1-d7ca-48d4-badf-7d3fe5bb13cd@app.fastmail.com> (raw)
In-Reply-To: <b1234240-9cc1-47ea-ad61-fe64feb14ce4@app.fastmail.com>

FYI, I got this working with some easy-on-eyes formatting:

after_fork do |server, worker|
    Signal.trap("INFO") do
        Thread.list.each do |th|
            puts("====\n#{th.inspect} #{th.backtrace.join("\n\t")}")
        end
    end
end

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?
> 
> [0]: https://github.com/sidekiq/sidekiq/issues/5876#issuecomment-1529919584
> [1]: https://github.com/puma/puma/pull/1320
> 
> Mike

  reply	other threads:[~2023-05-11 18:25 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 [this message]
2023-05-11 19:01   ` 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=b7ef50c1-d7ca-48d4-badf-7d3fe5bb13cd@app.fastmail.com \
    --to=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).