Files
leadchat/config/sidekiq.yml
Sojan Jose 72f206025a chore: Fix connection pool (#6005)
We want to allocate as much database connection to the pool to match the sidekiq concurrency configuration.
ref: https://maxencemalbois.medium.com/the-ruby-on-rails-database-connections-pool-4ce1099a9e9f

fixes: #6004
2023-01-16 17:50:23 +05:30

36 lines
1017 B
YAML

# Sample configuration file for Sidekiq.
# Options here can still be overridden by cmd line args.
# Place this file at config/sidekiq.yml and Sidekiq will
# pick it up automatically.
---
:verbose: false
:concurrency: <%= ENV.fetch("SIDEKIQ_CONCURRENCY", 5) %>
:timeout: 25
:max_retries: 3
# Sidekiq will run this file through ERB when reading it so you can
# even put in dynamic logic, like a host-specific queue.
# http://www.mikeperham.com/2013/11/13/advanced-sidekiq-host-specific-queues/
:queues:
- [low, 1]
- [scheduled_jobs, 1]
- [webhooks, 1]
- [bots, 1]
- [active_storage_analysis, 1]
- [action_mailbox_incineration, 1]
- [active_storage_purge, 1]
- [integrations, 2]
- [default, 2]
- [mailers, 2]
- [medium, 3]
- [events, 3]
- [action_mailbox_routing, 3]
- [high, 5]
- [critical, 10]
# you can override concurrency based on environment
production:
:concurrency: <%= ENV.fetch("SIDEKIQ_CONCURRENCY", 10) %>
staging:
:concurrency: <%= ENV.fetch("SIDEKIQ_CONCURRENCY", 5) %>