Search code examples
sidekiq

how to detach sidekiq process once started in terminal


I want to run sidekiq on my production server, I am using this command to start the process

bundle exec sidekiq -q mailer,5 -q default -e production

How do I detach from the process without stopping it, so that I can close the connection to server.


Solution

  • The right answer is lower case -d:

    bundle exec sidekiq -d -q mailer,5 -q default -e production
    

    sidekiq --help will list the options:

    -d, --daemon                     Daemonize process
    

    When running -d option, sidekiq will ask for a log file, so the complete command is:

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