#How to configure signal stopping a service?

9 messages · Page 1 of 1 (latest)

lavish ermine
#

Hello, how can I configure the signal that is used by a deployment is stopped (e.g., after a new one has been deployed)? Some services react to specific signals, e.g., Celery workers react to SIGTERM. And how to configure the time given to the service to stop?

And first of all, what signal (SIGINT, SIGTERM, SIGKILL, etc.) is used to stop a running service? And what is the timeout?

untold sapphireBOT
#

Project ID: 1bdc3280-a00a-4cae-803e-463d1c7f0abc

lavish ermine
#

1bdc3280-a00a-4cae-803e-463d1c7f0abc

untold sapphireBOT
#

SIGTERM is typically used to stop a running service, and the timeout can be configured depending on the service. For example, Celery workers can be configured to have a specific timeout before they are stopped.

lavish ermine
#

This sounds relevant, but what is the source? How to configure the timeout?

near hull
#

SIGTERM or SIGKILL but you will need to disable restarts so that your service exits sucessfully

lavish ermine
#

Is it SIGTERM or SIGKILL? Is it configurable?

near hull
#

both, and no, we just detect if there is a 0 exit code

#

non 0 exit code tells us that something crashed, and then we attempt to revive the service