Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use sidekiq concurrency field to set DB_POOL #160

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

abbottmg
Copy link
Contributor

@abbottmg abbottmg commented Feb 2, 2025

There are really two stages to this PR to consider.

The easy one is allowing deployment-sidekiq to set the DB_POOL env variable per sidekiq worker definition. The second one specifically sets it to the concurrency value rather than using an independent key. My memory is that sidekiq should never need more DB connections than it has threads, so this reduces connection overhead for workers with low duty cycles (eg a worker dedicated to one of the scheduler, mailers, and potentially ingress queues).

@timetinytim
Copy link
Contributor

As far as I can tell this should be fine, though @renchap is more familiar with exactly how this work, and can confirm whether this should be alright.

@timetinytim timetinytim self-assigned this Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants