14

I already setup Redis, Sidekiq and Rails app, I can access it form //url/sidekiq, but how do I start the Sidekiq worker on a VPS? On my local I do:
bundle exec sidekiq -q carrierwave,5 default

What should I do on a VPS hosting?

Thanks

user1883793
  • 4,011
  • 11
  • 36
  • 65
  • possible duplicate of [how to detach sidekiq process once started in terminal](http://stackoverflow.com/questions/14790727/how-to-detach-sidekiq-process-once-started-in-terminal) – ardavis Oct 23 '13 at 13:01

1 Answers1

30

Looks like this is a duplicate of this question: how to detach sidekiq process once started in terminal

You have to run the following command from your Rails root:

bundle exec sidekiq -d -L sidekiq.log -q mailers,5 -q default -e production

This will detach the process so you can quit the ssh session and the command will keep running in the background, logging the output to the sidekiq.log file.

Take care to choose the appropriate position for the log file, and don't forget to setup a logrotate rule for it.

Community
  • 1
  • 1
Fabrizio Regini
  • 1,500
  • 13
  • 26
  • It took me some time to realize this. The queue for emails is called "mailers", not "mailer" (note 's' at the end). It would be awesome if you fix that, Fabrizio. Thank you. – Yanis Mar 22 '15 at 12:13
  • FYI: ERROR: Daemonization mode was removed in Sidekiq 6.0, please use a proper process supervisor to start and manage your services ERROR: Logfile redirection was removed in Sidekiq 6.0, Sidekiq will only log to STDOUT / – mansoor.khan Apr 17 '23 at 22:30