discourse/config
Alan Guo Xiang Tan 23c38cbf11
DEV: Log Unicorn worker timeout backtraces to Rails.logger (#27257)
This commit introduces the following changes:

1. Introduce the `SignalTrapLogger` singleton which starts a single
   thread that polls a queue to log messages with the specified logger.
   This thread is necessary becasue most loggers cannot be used inside
   the `Signal.trap` context as they rely on mutexes which are not
   allowed within the context.

2. Moves the monkey patch in `freedom_patches/unicorn_http_server_patch.rb` to
   `config/unicorn.config.rb` which is already monkey patching
   `Unicorn::HttpServer`.

3. `Unicorn::HttpServer` will now automatically send a `USR2` signal to
   a unicorn worker 2 seconds before the worker is timed out by the
   Unicorn master.

4. When a Unicorn worker receives a `USR2` signal, it will now log only
   the main thread's backtraces to `Rails.logger`. Previously, it was
   `put`ing the backtraces to `STDOUT` which most people wouldn't read.
   Logging it via `Rails.logger` will make the backtraces easily
   accessible via `/logs`.
2024-06-03 12:51:12 +08:00
..
environments DEV: Catch missing translations during test runs (#26258) 2024-05-24 22:15:53 +08:00
initializers DEV: Update to lastest rubocop-discourse 2024-05-27 18:06:14 +02:00
locales FEATURE: Allow "move to inbox" and "move to archive" for private messages using new bulk topic dropdown (#27236) 2024-06-03 14:37:28 +10:00
application.rb FEATURE: Add experimental option for strict-dynamic CSP (#25664) 2024-02-16 11:16:54 +00:00
boot.rb PERF: Stop running bootsnap in development mode on all environments (#25737) 2024-02-19 11:33:52 +08:00
cdn.yml.sample
database.yml DEV: Fix checkout time not properly enabled on CI (#25621) 2024-02-09 06:02:42 +08:00
deploy.rb.sample
dev_defaults.yml DEV: Convert admin-incoming-email modal to component-based API (#22701) 2023-07-20 16:31:20 -05:00
discourse_defaults.conf FIX: Use MaxMind supplied permalinks to download MaxMind databases (#26847) 2024-05-09 15:11:56 +08:00
discourse.config.sample
discourse.pill.sample
environment.rb DEV: Apply syntax_tree formatting to config/* 2023-01-09 11:13:29 +00:00
logrotate.conf
multisite.yml.production-sample
nginx.global.conf
nginx.sample.conf FEATURE: Add support for AVIF images (#21680) 2023-05-24 16:13:36 -03:00
projections.json
puma.rb DEV: Apply syntax_tree formatting to config/* 2023-01-09 11:13:29 +00:00
routes.rb FEATURE: admin can disable flags (#27171) 2024-05-29 14:39:58 +10:00
sidekiq.yml
site_settings.yml UX: Hide 'same site cookies' site setting (#27230) 2024-05-28 16:13:45 +01:00
spring.rb DEV: Apply syntax_tree formatting to config/* 2023-01-09 11:13:29 +00:00
thin.yml.sample
unicorn_launcher
unicorn_upstart.conf
unicorn.conf.rb DEV: Log Unicorn worker timeout backtraces to Rails.logger (#27257) 2024-06-03 12:51:12 +08:00