mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
Warn about any threads started during app preload
This commit is contained in:
parent
68782a4d5d
commit
a2288fd656
1 changed files with 14 additions and 0 deletions
|
@ -278,9 +278,23 @@ module Puma
|
|||
|
||||
log "* Process workers: #{@options[:workers]}"
|
||||
|
||||
before = Thread.list
|
||||
|
||||
if preload?
|
||||
log "* Preloading application"
|
||||
load_and_bind
|
||||
|
||||
after = Thread.list
|
||||
|
||||
if after.size > before.size
|
||||
log "! WARNING: Detected #{after.size-before.size} Thread(s) started in app boot:"
|
||||
threads = (after - before)
|
||||
if threads.first.respond_to? :backtrace
|
||||
threads.each do |t|
|
||||
log "! #{t.inspect} - #{t.backtrace.first}"
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
log "* Phased restart available"
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue