Hosted R Studio hangs when trying to open

1.4k Views Asked by At

When I try to open Rstudio in my browser I get the spinning gif and after a while a popup telling me that RStudio is taking a long time to open. The popup gives me an option to terminate the session or wait. If I choose terminate nothing happens, the gif keeps spinning and I get the same message again.

Other posts on SO suggests deleting files like .RData. I searched my home directory and there is no .RData file (I typically don't save my workspace).

I'm not sure if there are other directories I can look in to delete. In the temrinal from my home directory if I type ls -la I see:

drwxr-xr-x 11 myname myname 4096 Aug 27 10:28 .
drwxr-xr-x  6 root     root     4096 Jul 13 05:56 ..
-rw-------  1 myname myname 7877 Aug 27 09:17 .bash_history
-rw-r--r--  1 myname myname  220 Jul 13 05:56 .bash_logout
-rw-r--r--  1 myname myname 3771 Jul 13 05:56 .bashrc
drwx------  2 myname myname 4096 Jul 14 02:19 .cache
-rw-rw-r--  1 myname myname    0 Jul 14 02:19 .cloud-locale-test.skip
drwxr-xr-x  3 myname myname 4096 Aug 19 02:59 .config
drwxrwxr-x  2 myname myname 4096 Jul 13 06:03 .nano
-rw-r--r--  1 myname myname  655 Jul 13 05:56 .profile
drwxr-xr-x 19 myname myname 4096 Aug 27 03:48 .rstudio
drwx------  2 myname myname 4096 Jul 13 06:03 .ssh
drwxr-xr-x  3 myname myname 4096 Jul 13 05:58 .subversion
drwxr-xr-x  3 myname myname 4096 Jul 13 05:58 R
-rw-rw-r--  1 myname myname  894 Aug 18 11:34 log.txt
drwxrwxr-x  2 myname myname 4096 Aug  1 04:58 lookups
drwxrwxr-x  3 myname myname 4096 Aug 27 10:41 rscripts

I sometimes navigate to directory rscripts from within r (the last session I was working in was in this directory). When I ls -la from there I see:

drwxrwxr-x  3 myname myname  4096 Aug 27 10:41 .
drwxr-xr-x 11 myname myname  4096 Aug 27 10:28 ..
-rw-r--r--  1 myname myname   604 Aug  1 04:55 aid.db.R
-rw-------  1 myname myname 17285 Aug 24 19:10 nohup.out
-rw-r--r--  1 myname myname  7258 Aug 27 06:11 preprocessing.R
drwxr-xr-x  2 myname myname  4096 Aug 27 05:51 robjects
-rw-r--r--  1 myname myname  2712 Aug  1 04:56 spelling.R
-rw-r--r--  1 myname myname  4473 Aug  7 02:19 training_cross_validation.R

These are just some scripts I've been working on.

With a Google search I found a reference to directory .rstudio containing session data. Here are the contents of .rstudio:

total 1196
drwxr-xr-x 19 myname myname   4096 Aug 27 03:48 .
drwxr-xr-x 11 myname myname   4096 Aug 27 10:28 ..
-rw-r--r--  1 myname myname      3 Aug 27 03:48 addin_registry
drwxr-xr-x  2 myname myname   4096 Aug 26 20:54 client-state
drwxr-xr-x  2 myname myname   4096 Jul 17 03:34 content_urls
drwxr-xr-x  2 myname myname   4096 Aug 26 10:30 ctx
drwxr-xr-x  4 myname myname   4096 Aug 19 02:59 dictionaries
drwxr-xr-x  2 myname myname   4096 Aug  1 03:55 graphics-r3
-rw-r--r--  1 myname myname 347777 Aug 27 10:06 history_database
-rw-r--r--  1 myname myname 768019 Aug 25 05:57 history_database.1
drwxr-xr-x  6 myname myname   4096 Jul 13 05:58 monitored
drwxr-xr-x  2 myname myname   4096 Aug 26 10:49 notebooks
drwxr-xr-x  2 myname myname   4096 Aug 26 20:54 pcs
-rw-r--r--  1 myname myname    461 Aug 26 20:54 persistent-state
drwxr-xr-x  2 myname myname   4096 Jul 13 05:58 presentation
drwxr-xr-x  2 myname myname   4096 Jul 13 05:58 profiles-cache
drwxr-xr-x  2 myname myname   4096 Jul 13 14:34 projects_settings
-rw-r--r--  1 myname myname      5 Aug 26 20:54 rmd-outputs
drwxr-xr-x  2 myname myname   4096 Aug 19 03:00 rversion-settings
-rw-r--r--  1 myname myname     27 Aug 26 20:54 saved_source_markers
drwxr-xr-x  5 myname myname   4096 Aug 26 20:54 sdb
-rw-r--r--  1 myname myname     96 Aug 27 09:21 session-persistent-state
drwxr-xr-x  3 myname myname   4096 Jul 13 05:58 sessions
drwxr-xr-x  3 myname myname   4096 Aug 26 20:54 suspended-session-data
drwx------  2 myname myname   4096 Jul 13 05:58 viewer-cache
drwxr-xr-x  2 myname myname   4096 Aug 27 03:48 viewer_history

I'm tempted to start deleting files and directories but am concerned about buckling RStudio. I'm not concerned about retrieving data from my last session.

Is there a directory somewhere where I can delete files from my previous session and have RStudio not try to load my previous session?


Tried deleting cookies and signing in from another browser too, no success


In the terminal when I go top > 1 I don't see any rstudio or rsession related process' running either


Another piece of information that may or may not be relevant. When this issue started I was in the middle of running a dopar loop using 14 of 15 cores. My understanding is that each core creates a new session. As it was taking longer than usual I tried to cancel the operation using the red stop button. Ever since I have not been able to access Rstudio

enter image description here

1

There are 1 best solutions below

4
On

Our system administrator had to restart RStudio and I was able to connect again. Would like to know what triggered this and if it's avoidable, or if there's a way to rectify without restart. I was told to try brute force if it happens again with sudo shutdown -r now