diff --git a/config/unicorn.conf.rb b/config/unicorn.conf.rb index bc47ed7e85e..bc8a074d2ce 100644 --- a/config/unicorn.conf.rb +++ b/config/unicorn.conf.rb @@ -114,6 +114,8 @@ before_fork do |server, worker| require 'demon/sidekiq' + DiscourseEvent.trigger(:sidekiq_fork_started) + if @stats_socket_dir Demon::Sidekiq.after_fork do start_stats_socket(server) @@ -218,6 +220,8 @@ end after_fork do |server, worker| start_stats_socket(server) + DiscourseEvent.trigger(:web_fork_started) + # warm up v8 after fork, that way we do not fork a v8 context # it may cause issues if bg threads in a v8 isolate randomly stop # working due to fork