UCSF-CBI / rstudio-server-controller

RStudio Server Controller (RSC) - A Tool for Launching a Personal Instance of the RStudio Server
https://github.com/UCSF-CBI/rstudio-server-controller
ISC License
4 stars 2 forks source link

Time out rserver and ssh too #51

Closed HenrikBengtsson closed 2 years ago

HenrikBengtsson commented 2 years ago

Idea

There is a built-in mechanism for timing out rsession which we make use of. There is none for the rserver process itself.

What we could do is to run a monitor process in parallel that:

  1. Checks of the rsession PID is running. If it still is, do nothing (or reset below timer), and sleep for a while before repeating
  2. If the rsession is not running, start a timer
  3. When the timer runs out after, say, 60 minutes, check if a new rsession is running. If not, then timeout the rserver process and any reverse SSH connection. This should result the rsc start process terminating.

This is useful for not leaving behind stray rsc sessions on devel nodes and elsewhere.

HenrikBengtsson commented 2 years ago

Implemented:

Version 0.7.0-9001

Significant changes