Search code examples
ruby-on-railsruby-on-rails-5sidekiqsidekiq-monitor

Restart Sidekiq If it fails


Is there a way to restart sidekiq automatically if it gets killed because of some issue on the server - may me memory etc.

right now i have to login to the server command line and run something like

bundle exec sidekiq -d -P tmp/sidekiq.pid -L log/sidekiq.log 

Solution

  • In the Sidekiq wiki, there is a section about deployment, including upstart and systemd scripts. You can use those to ensure the process restarts appropriately.