Skip to content

Commit

Permalink
Remove thread allocation from catch-all queue
Browse files Browse the repository at this point in the history
  • Loading branch information
zachgoll committed Feb 4, 2025
1 parent 283d9cd commit 15e8281
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions config/database.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
default: &default
adapter: postgresql
encoding: unicode
# 3 connections for Puma, 13 for GoodJob (in async mode, the default for self-hosters) = 16 connections
pool: <%= ENV.fetch("DB_POOL_SIZE") { 16 } %>
# 3 connections for Puma, 15 for GoodJob (in async mode, the default for self-hosters) = 18 connections
pool: <%= ENV.fetch("DB_POOL_SIZE") { 18 } %>
host: <%= ENV.fetch("DB_HOST") { "127.0.0.1" } %>
port: <%= ENV.fetch("DB_PORT") { "5432" } %>
user: <%= ENV.fetch("POSTGRES_USER") { nil } %>
Expand Down
4 changes: 2 additions & 2 deletions config/initializers/good_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@

config.good_job.on_thread_error = ->(exception) { Rails.error.report(exception) }

# 10 queue threads + 3 for job listener, cron, executor = 13 threads allocated
# 7 dedicated queue threads + 5 catch-all threads + 3 for job listener, cron, executor = 15 threads allocated
# `latency_low` queue for jobs ~30s
# `latency_medium` queue for jobs ~1-2 min
# `latency_high` queue for jobs ~5+ min
config.good_job.queues = "latency_low:3;latency_low,latency_medium:4;latency_low,latency_medium,latency_high:2;*:1"
config.good_job.queues = "latency_low:2;latency_low,latency_medium:3;latency_low,latency_medium,latency_high:2;*"

# Auth for jobs admin dashboard
ActiveSupport.on_load(:good_job_application_controller) do
Expand Down

0 comments on commit 15e8281

Please sign in to comment.