Does anyone know how to find sidekiq's pidfile to gracefully shut it down? Running ps ax | grep sidekiq
and then running sidekiqctl stop <pid from grep>
consistently gives a no such pidfile
error? Cntl-C and Cntl-D also seem to have no effect.
Closing the process window and reopening a new window doesn't kill the process as it appears to be running as a daemon.
The only consistent fix I've found is rebooting.
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.
In order to restart a Sidekiq worker, the recommended way is to send SIGTERM, which is the signal sent to a process to request its termination, to the worker process with a pre-defined timeout configured, followed by the spawning of a new process.
Sidekiq is an open-source framework that provides efficient background processing for Ruby applications. It uses Redis as an in-memory data structure to store all of its job and operational data. It's important to be aware that Sidekiq by default doesn't do scheduling, it only executes jobs.
Use this to kill sidekiq forcefully.
ps -ef | grep sidekiq | grep -v grep | awk '{print $2}' | xargs kill -9
Sidekiq provides the ability to specify a pidfile at start time or, as shown below, to create the pidfile after the process has been started. In either case you can then use the pidfile at stop time.
ps -ef | grep sidekiq
to find the pidsidekiq.pid
) with the only contents being the pid you just foundsidekiqctl stop <pidfile_name>
-P <pidfile_name>
or --pidfile <pidfile_name>
when starting sidekiq in the futureIf 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