RStudio Server
Basic Configuration
To begin an RStudio Server OnDemand session, the basic configuration we recommend is less than 4 hours (unless you require more), at least a single core, and at least 750MB memory. We also have a recommended R version that contains a bundle of widely used CRAN packages. Please see more on our R modules and versions in our R Versions and Bundles documentation.
Advanced Configuration Options
Beyond these basic configuration parameters, there are more session configurations you can make by selecting the Advanced Options
box below the set of basic configuration options. Here, you can load additional modules that you may need for additional R libraries that aren't in the default bundle. You can also specify the node type for the session to run on, request GPUs and multiple tasks.
RStudio Server Shows Blank or Gray Screen, or error "Status code 502"
When using RStudio Server through OnDemand, some users have found that the job will start normally, but when connecting from OnDemand, a tab with a blank or gray screen shows up instead of RStudio Server. Sometimes, RStudio Server will load successfully from this screen. Please wait at least a full minute on this screen before proceeding to the solution below.
Resolving
However, if you notice that the gray screen persists after one minute of waiting, or you receive the error "Status code 502 returned by RStudio Server when executing 'client_init'" it is possible that RStudio Server is stuck trying to load. As a workaround, sometimes reloading the tab and waiting another minute can work.
Otherwise, clearing RStudio's temporary files stored at ~/.local/share/rstudio
can fix the issue. Note that this will likely reset your RStudio session, so you may need to reopen previous projects and files and could lose any unsaved work.
To do this, we recommend moving the files to a backup using a command like
1 |
|
Trying to load RStudio Server should work again (though you may need to wait a minute or two for the gray screen to go away as described above).
Preventing
While we are not sure what exactly causes this, our guess is that either 1) RStudio Server's temporary files have been corrupted after a job shut down incorrectly or 2) RStudio Server has saved large files from the last time it was open and tries to reload them. We highly recommend that you:
- Shut down your RStudio session instead of letting your job time out in OnDemand. This is done by clicking the power button in the top right corner of RStudio Server.
- Ensure that RStudio Server does not save your workspace data on exit. This can be accomplished by clicking the "Tools" menu and selecting "Global Options". In the default "General" pane under the "Workspace" header ensure that "Restore .RData into workspace at startup:" is unchecked and that "Save workspace to .RData on exit:" is set to Never.