Articles in this section

Is there a way to stop and restart a worker?

Restart workers

To restart workers, use the following commands from inside an SSH session.

sv stop app / systemctl --user stop app
sv start app / systemctl --user start app

The command is dependent on whether the service is based on our runit based or newer systemd based images.

Stop workers

To stop a worker during a deployment, connect via SSH and send a Signal terminate (SIGTERM) to terminate the process.

List all processes running and locate the worker to terminate:

ps -fauxw 

Once you located the process to terminate, and it's process ID (PID) You can use the following command to send a SIGTERM:

kill <PID>

This command allows your worker to pause it's work, especially when it's a worker that cannot stop its process mid-task.

If, however, the worker does not respond after 15 seconds, allow the Container to be shut down and restarted by sending a Signal kill (SIGKILL):

kill -9 <PID>
Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.