RStudio Startup Issue on Open OnDemand

Hello all,

We’ve observed that RStudio hangs when loading large datasets/environments from previous sessions upon startup of a new RStudio session, therefore creating issues with users losing access to RStudio. The app itself would launch but it just remains as a blank page.

We’ve tried the option of setting the load workspace as false in .config/rstudio/rstudio-prefs.json as follows but it still did not work:

{
    "load_workspace": false,
    "initial_working_directory": "~",
    "posix_terminal_shell": "bash",
    "default_project_location": <project location>
}

This is what we see on the project level (.Rproj):

Version: 1.0
RestoreWorkspace: Default
SaveWorkspace: Default
AlwaysSaveHistory: Default
EnableCodeIndexing: Yes
UseSpacesForTab: Yes
NumSpacesForTab: 2
Encoding: UTF-8
RnwWeave: Sweave
LaTeX: pdfLaTeX

Would anyone be able to advise on the best way to troubleshoot this recurring issue?

Hi and welcome!

It maybe restore_last_project you’re looking for. I found that by toggling the setting in the rstudio UI (below), but looking at the UI it may also be an .RData file in the workspace?

{
    "reuse_sessions_for_project_links": true,
    "jobs_tab_visibility": "shown",
    "restore_source_documents": false,
    "initial_working_directory": "~",
    "restore_last_project": false,
    "posix_terminal_shell": "bash"
}

Other than that you may be able to find big files in ~/.rstudio or ~/.rstudio-desktop depending on the version. Once you find them, there could be a way to safely delete them if that’s the course of action you’d want to take.

Hi Jeff,

This issue is still persisting for us especially when a user loads a large dataset – RStudio would freeze and the GUI would become unresponsive. Because of this, we are unable to disable “Restore .RData into workspace at startup” on the GUI but at the same time the user that is facing this problem now have not been saving the .RData file but the RStudio server still shows that 8.1GB memory is used on the dashboard, which tells me that the data is still getting loaded from somewhere. The user was able to clear the environment but nothing seems to work still.

Is there a workaround for this through the terminal? Also where can I find the path to ~/.rstudio or ~/.rstudio-desktop? The version that is installed on our open ondemand is R 4.1.2

Thank you,
Jamie

RStudio’s docs are sort of all over the place (meaning the’yre not great to find at all and very sparse).

It’s not so much the R version that’s important, but the version of Rstudio itself here that’s important as I believe they’ve changed this local user configuration from one directory to another.

Because we use several versions, I have both (and ~/.config/rstudio) so the config you’re looking for could be anywhere.

That said - please share whatever you can if you can share it because we’ve had users at OSC with the same issue and I cannot really replicate as I’m not an R user myself. So if you have a way to replicate that’d be super helpful.