7

I frequently work on a R-server environment. However, whenever come back to my work following the last working day, the system often gets stuck with 'resuming r session'. This might take upwards of 5-15min. I try to terminate R or restart R but often this doesn't really do anything.

I'm looking for a work-around as it is very frustrating to go to the R-server URL and to have to wait forever to get started again. IDEALLY, I'd be able to pick up right where I left off. However, if this can't be done, I guess that is ok….

I was looking around at the folder structure and I noticed that there is a folder called "Suspended-R-Session".

Within this folder are a few files such as:

  • 'options',
  • 'lib paths',
  • 'history',
  • 'environment_vars',
  • 'environment',
  • and 'settings'.

    Should I be deleting these files in order to speed up load time???

runningbirds
  • 6,235
  • 13
  • 55
  • 94
  • Chances are that RStudio is spending all this time restoring your R workspace (that is, large R objects that lived in your global environment). If you're okay with losing that workspace, you can safely delete that folder. – Kevin Ushey Apr 19 '17 at 05:35
  • 1
    So is there no way to abandon an RStudio server session with large files in the workspace (e.g., a 5GB data frame) for say, 6 hours, then return to the session without experiencing the frustrating wait to resume? It sounds like the advice in the above comment is to delete the folder, and start from scratch. Yikes... – ericgtaylor Jun 18 '17 at 01:16
  • 1
    Try disabling the session timeout (the default is saving the session to disk after 2 hours of inactivity): https://support.rstudio.com/hc/en-us/articles/200552316-Configuring-the-Server – Feng Mai Jan 10 '20 at 19:02

1 Answers1

11

As described in this link https://support.rstudio.com/hc/en-us/community/posts/200638878-resuming-session-hangup, in my case for R version 3.5:

    cd ~/.rstudio/sessions/active/session-45204d30
    rm -rf suspended-session-data
Le Quang Nam
  • 322
  • 3
  • 9
  • The link does not work for me. Also, I have tried using these two command lines, but somehow it does not solve the issue. It still keeps loading when I log in and the only way for me is to terminate R session. – MK Huda Aug 15 '22 at 10:05
  • 1
    It would be best if you tried cd to the folder `~/.rstudio/sessions/active/`, look for any `session` folder inside, then cd into it. Then again, look for any `suspended` session folder and remove it. – Le Quang Nam Aug 18 '22 at 04:56