2

Recently had to prioritize my Sidekiq queues (before I was using only the default queue). so, i thought of using reserved queues as per https://github.com/mperham/sidekiq/wiki/Advanced-Options#reserved-queues

config/sidekiq.yml contents:

---
:concurrency: 25
:logfile: ./log/sidekiq.log
:queues:
  - default
  - mailers

config/sidekiq_critical.yml contents:

---
:concurrency: 10
:logfile: ./log/sidekiq.log
:queues:
  - critical

in development environment, I can able to start 2 side instances with different config files as below

sidekiq -C config/sidekiq.yml
sidekiq -C config/sidekiq_critical.yml

I can able to see both sidekiq instances with different queues in sidekiq ui

I don't know how to run similar way in production environment. For production we are using similar as of mentioned in https://github.com/mperham/sidekiq/tree/master/examples/upstart

sidekiq.conf contents

script
exec /bin/bash <<'EOT'
  sudo -i -u ec2-deploy
  cd path/to/app
  RAILS_ENV=production bundle exec sidekiq -C config/sidekiq.yml
  RAILS_ENV=production bundle exec sidekiq -C config/sidekiq_critical.yml
EOT
end script

But i can able to see only one instance of sidekiq is running with config/sidekiq.yml queues.

Please help how to do run two sidekiq instances with different config files in the same server

Harikrishnan
  • 94
  • 1
  • 7

1 Answers1

3

You'd create a sidekiq2.conf. Or sidekiq-critical.conf. Or any name you want.

Mike Perham
  • 21,300
  • 6
  • 59
  • 61
  • I have created another sidekiq configuration as mentioned **sidekiq-critical.conf**. But still only one sidekiq instance is running as per configuration in **config/sidekiq.yml**. 
 i am using workers.conf as mentioned in [https://github.com/mperham/sidekiq/tree/master/examples/upstart](https://github.com/mperham/sidekiq/tree/master/examples/upstart) Do i need to make any changes in **workers.conf**? – Harikrishnan Oct 24 '18 at 08:36
  • Thanks Mike Perham.Got the issue with workers.conf file.. Made changes and working fine. – Harikrishnan Oct 29 '18 at 07:57