diff options
-rw-r--r-- | lib/unicorn/configurator.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/unicorn/configurator.rb b/lib/unicorn/configurator.rb index a8bb41b..402204e 100644 --- a/lib/unicorn/configurator.rb +++ b/lib/unicorn/configurator.rb @@ -19,7 +19,11 @@ module Unicorn server.logger.info("worker=#{worker_nr} spawned pid=#{$$}") # per-process listener ports for debugging/admin: - # server.add_listener("127.0.0.1:#{8081 + worker_nr}") + # "rescue nil" statement is needed because USR2 will + # cause the master process to reexecute itself and the + # per-worker ports can be taken, necessitating another + # HUP after QUIT-ing the original master: + # server.listen("127.0.0.1:#{8081 + worker_nr}") rescue nil }, :before_fork => lambda { |server, worker_nr| server.logger.info("worker=#{worker_nr} spawning...") |