Closed HenrikBengtsson closed 2 years ago
We're currently signal SIGTERM to all processes we want to shut down:
SIGTERM
https://github.com/UCSF-CBI/rstudio-server-controller/blob/e1416dcb6b2ebf8a837eb50141dd20cd875463b3/bin/rsc#L1369-L1396
but we don't really make sure the processes are truly terminated afterward. It could be that they keep running, e.g. stuck or overwhelmed processes.
terminate_rsession()
terminate_rserver()
terminate_rserver_monitor()
terminate_ssh_revtunnel()
SIGKILL
SIGQUIT
Now tries multiple times with TERM, sleep one second before checking, and if still running, sleep two seconds and repeat. After four failed TERMs, do one last with KILL.
We're currently signal
SIGTERM
to all processes we want to shut down:https://github.com/UCSF-CBI/rstudio-server-controller/blob/e1416dcb6b2ebf8a837eb50141dd20cd875463b3/bin/rsc#L1369-L1396
but we don't really make sure the processes are truly terminated afterward. It could be that they keep running, e.g. stuck or overwhelmed processes.
Actions
terminate_rsession()
,terminate_rserver()
,terminate_rserver_monitor()
, andterminate_ssh_revtunnel()
.SIGKILL
orSIGQUIT
?