3

I am setting a Ruby On Rails application deployed to Heroku Platform. The application uses sidekiq process to perform certain tasks. I wish to find the suitable configuration/formula for finding the config values in sidekiq.yml. I have 20 Redis connections available.

My application is running with 4 units of Heroku Worker Processes. I have set the sidekiq redis client size to 1 and server size to 8 and a concurrency of 2. When i had increased the worker unit to 20, i got a Connection exceeded error.


# sidekiq.rb

Sidekiq.configure_client do |config|
  config.redis = {
    size: ENV['SIDEKIQ_REDIS_CLIENT_SIZE'].to_i,
    url: ENV['REDIS_URL'] || 'redis://localhost:6379/1'
  }
end

Sidekiq.configure_server do |config|
  config.redis = {
    size: ENV['SIDEKIQ_REDIS_SERVER_SIZE'].to_i,
    url: ENV['REDIS_URL'] || 'redis://localhost:6379/1'
  }
end

# sidekiq.yml

production:
  :concurrency: 2

I expect to receive a suitable configuration or a formula to calculate the suitable configuration

0 Answers0