I am using sidekiq gem to run API calls in background. I ran sidekiq in Daemon process like:
bundle exec sidekiq -d
Now I made some changes in my method, so I want to restart sidekiq. I tried to kill the sidekiq by using the below command:
kill -9 process_id
but it's not working. I want to know the command to restart sidekiq process. If you have any idea please share with me.
I tried the below command also:
sidekiqctl stop /path/to/pid file/pids/sidekiq.pid
To run sidekiq, you will need to open a terminal, navigate to your application's directory, and start the sidekiq process, exactly as you would start a web server for the application itself. When the command executes you will see a message that sidekiq has started.
The only consistent fix I've found is rebooting. kill 'process_id' worked fine, to kill the process. Though then restarting sidekiq it can't find redis. Moreover, 'kill -term pid' will cause it to shut down as gracefully as it can in the next 10 seconds.
Start:
$ bundle exec sidekiq -d -P tmp/sidekiq.pid -L log/sidekiq.log
where -d
demonize, -P
pid file, -L
log file.
Stop:
$ bundle exec sidekiqctl stop tmp/sidekiq.pid 0 Sidekiq shut down gracefully.
where 0
is number of seconds to wait until Sidekiq exits.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With