Sidekiq For Heroku

  1. Version incompatible

The latest version of Redis gem makes quite much issues, the easiest way to deal with it is downgrade Redis gem version:

1
gem 'redis', '< 4.6'

And update this dependencies by:

1
bundle update
  1. Config sidekiq
1
2
3
4
5
6
7
8
9
# config/initializers/sidekiq.rb

Sidekiq.configure_server do |config|
config.redis = { ssl_params: { verify_mode: OpenSSL::SSL::VERIFY_NONE } }
end

Sidekiq.configure_client do |config|
config.redis = { ssl_params: { verify_mode: OpenSSL::SSL::VERIFY_NONE } }
end

Note: verify_mode: OpenSSL::SSL::VERIFY_NONE is a must to make it works with Heroku

1
2
3
4
# Custom sidekiq default settings: config/sidekiq.yml

concurrency: 5
max_retries: 3
  1. Update Procfile
1
worker: bundle exec sidekiq -c 2
  1. Enable worker in the Heroku dashboard, by the default it was disable

  2. Check worker log

1
heroku logs --t --app APP_NAME --dyno worker