I am running rstudio-server on a virtualised (vmware-player) ubuntu machine, and processing lots of data into the ram. I find that after some inactivity that the session suspends the data. The problem is that it takes a VERY long time to resume this session and it is making both the host machine and virtual machine lag very badly.
I just want to kill the session and start a new fresh session of rstudio-server, but so far the only way I have found which does this is to reisub
my ubuntu machine. Does anyone know a better solution?
As a side note, I think entering session-timeout-minutes=0
in /etc/rstudio/rsession.conf
as per here should fix the problem of the session suspending.
Considering the updates on Rstudio and as it was announced on August 30, 2023, the files are stored in two places:
~/.config/rstudio/
: All user settings (Global Options)~/.local/share/rstudio/
: All open files and tabs, as well as active and suspended sessions.Therefore, you can flush/clear/delete the files of the session by:
kill the active session (or kill all sessions)
# get the PID
rstudio-server active-sessions
# kill the specific session
sudo rstudio-server kill-session 25039 # or whatever the your PID is
or
sudo rstudio-server kill-all
Renaming the session files and add -old
(good practice instead of deleting it right-away):
mv "${HOME}/.local/share/rstudio" "${HOME}/.local/share/rstudio-old"
Restarting Rstudio
sudo rstudio-server restart
Now open the Rtsudio in the browser and check if everything works normally. You can then delete the session you marked as -old
by the following:
rm -rf "${HOME}/.local/share/rstudio-old"