System call when render server gets new deploy


I need to figure out when a server is going to be terminated (either because of a new deploy or because of a contractionary event via autoscaling).

What system call / what can I listen to so that I can appropriately shut down the server?

Hi josh, the platform sends a SIGTERM when your service is going to be terminated. You should be able to handle that signal to do any cleanup. After some grace period, the platform sends a SIGKILL which will immediately terminate your service.