Reduce GoodJob thread count to prevent web thread exhaustion

- Reduced total GoodJob threads from 24 to 8 (3+2+3)
- Leaves 8 free web threads available when GoodJob is busy
- Prevents thread pool contention with RAILS_MAX_THREADS=16
This commit is contained in:
Zach Latta
2025-06-24 20:20:47 -04:00
parent ff863b328b
commit 4cbd38e35c

View File

@@ -15,7 +15,8 @@ Rails.application.configure do
config.good_job.enable_cron = Rails.env.production?
# https://github.com/bensheldon/good_job#configuring-your-queues
config.good_job.queues = "latency_10s:8; latency_5m,latency_10s:6; literally_whenever,*,latency_5m,latency_10s:10"
# Reduced from 24 to 8 total threads to leave room for 16 web request threads
config.good_job.queues = "latency_10s:3; latency_5m,latency_10s:2; literally_whenever,*,latency_5m,latency_10s:3"
# https://github.com/bensheldon/good_job#pgbouncer-compatibility
GoodJob.active_record_parent_class = "ApplicationDirectRecord"