Skip to content

Commit

Permalink
chore: fix pool size for good_job process to include 3 extra for LIST…
Browse files Browse the repository at this point in the history
…EN/NOTIFY and CRON
  • Loading branch information
ericenns committed Feb 26, 2025
1 parent 56e40b9 commit c335776
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion config/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ default: &default
encoding: unicode
# For details on connection pooling, see Rails configuration guide
# https://guides.rubyonrails.org/configuring.html#database-pooling
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
#
# For GoodJob container, pool size is GOOD_JOB_MAX_THREADS (5) + 3 (1 for LISTEN/NOTIFY, 2 for CRON)
pool: <%= $PROGRAM_NAME.include?("good_job") ? ENV.fetch("GOOD_JOB_MAX_THREADS", 5).to_i + 3 : (ENV.fetch("RAILS_MAX_THREADS", 5).to_i) %>
<% if ENV["DB_HOST"] %>
host: <%= ENV["DB_HOST"] %>
username: postgres
Expand Down

0 comments on commit c335776

Please sign in to comment.