Automatically remove zombie processes from Workbench
Workbench
RStudio IDE
session management
Abstract
How to automatically terminate spawned zombie processes from Posit Workbench
Description
On Workbench, code run by developers may spawn additional processes. Upon termination of the primary process, child processes may not be removed, resulting in “zombie processes”.
Solution
Workbench can be configured to remove child processes when RStudio Pro sessions exit.
Update the Workbench configuration:
/etc/rstudio/rsession.conf
session-quit-child-processes-on-exit=1From there, restart the Workbench and Launcher services:
Terminal
sudo rstudio-server restart
sudo rstudio-launcher restartThis change will apply to newly created RStudio Pro sessions. Any existing zombie processes will need to be removed by killing the parent process if possible, or by rebooting the server.