2

When i execute command in development mode it's working fine using below command

bundle exec sidekiq -C config/sidekiq.yml

But when i add production flag along with command like below command

bundle exec sidekiq -e production -C config/sidekiq.yml

Sidekiq doesn't start and long error message shown as below

/home/ubuntu/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/bundler-1.17.1/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
/home/ubuntu/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/bundler-1.17.1/lib/bundler/cli.rb:27:in `dispatch'
/home/ubuntu/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/bundler-1.17.1/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
/home/ubuntu/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/bundler-1.17.1/lib/bundler/cli.rb:18:in `start'
/home/ubuntu/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/bundler-1.17.1/exe/bundle:30:in `block in <top (required)>'
/home/ubuntu/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/bundler-1.17.1/lib/bundler/friendly_errors.rb:124:in `with_friendly_errors'
/home/ubuntu/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/bundler-1.17.1/exe/bundle:22:in `<top (required)>'
/home/ubuntu/.rbenv/versions/2.5.3/bin/bundle:23:in `load'
/home/ubuntu/.rbenv/versions/2.5.3/bin/bundle:23:in `<main>'
/home/ubuntu/.rbenv/versions/2.5.3/bin/ruby_executable_hooks:24:in `eval'
/home/ubuntu/.rbenv/versions/2.5.3/bin/ruby_executable_hooks:24:in `<main>'

i am running these command on AWS-EC2 instance having ubuntu 18.4 OS version.

content of file config/sidekiq.yml-

:verbose: false
:concurrency: 10
:pidfile: tmp/pids/sidekiq.pid
:queues:
  - [critical, 2]
  - default
  - low

production:
  :concurrency: 25


staging:
  :concurrency: 15

content of file config/initialzers/sidekiq.rb

Sidekiq.configure_server do |config|
    config.redis = { url: 'redis://127.0.0.1:6379' }
  end

  Sidekiq.configure_client do |config|
    config.redis = { url: 'redis://127.0.0.1:6379' }
  end

content of file config/redis.yml

development: 'redis://127.0.0.1:6379'
test: 'redis://127.0.0.1:6379'
production: 'redis://127.0.0.1:6379'
Sheshnath
  • 3,293
  • 1
  • 32
  • 60

0 Answers0