Braham Shakti
Braham Shakti

Reputation: 1456

Sidekiq is not starting on server

Can some one tell me what is wrong with this command and why sidekiq is not starting

run "cd #{release_path}/App && RAILS_ENV=#{fetch(:stage)} bundle exec sidekiq -e #{fetch(:stage)} -C #{shared_path}/config/sidekiq.yml -P #{sidekiq_pid} -L #{shared_path}/log/sidekiq.log -d"

but capistrano is running this command

remote:   * executing "cd /home/user/applications/App/development/releases/00000000000001/App && RAILS_ENV=development bundle exec sidekiq -e development -C /home/user/applications/App/development/shared/config/sidekiq.yml -P /home/user/applications/App/development/shared/pids/sidekiq.pid -L /home/user/applications/App/development/shared/log/sidekiq.log -d"
remote:     servers: ["localhost"]
remote:     [localhost] executing command
remote:     command finished in 696ms

But still I have to start it manually even after sidekiq create sidekiq.pid file

Upvotes: 0

Views: 3094

Answers (1)

Antima Gupta
Antima Gupta

Reputation: 381

It may helpful for you :

In config/initializers/sidekiq.rb :

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

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

In config/sidekiq.yml :


:concurrency: 5 :pidfile: tmp/pids/sidekiq.pid staging: :concurrency: 10 production: :concurrency: 20 :queues: - default - [mailers, 2]

In config/routes.rb :

require "sidekiq/web"

mount Sidekiq::Web, at: "/sidekiq"

Upvotes: 1

Related Questions