RStudio unresponsive if connected to internet

I'm having a problem that I think is similar to the one here and I don't know how to debug it: RStudio extremely slow if wifi connected

If I'm using Rstudio desktop, things like saving a file, running a code block in an Rmd, or making a new file can randomly (but not infrequently) take a long time to complete.

My internet is not great here, so I would like to use rstudio offline (edit: I mean, I would rather use desktop rstudio, as opposed to server rstudio on my remote computer). As of now though, I'm having better luck using rstudio server through a computer somewhere else that has good internet (and maybe this is fine long run, so not an emergency to figure this out). No shared drives. Ubuntu 18.04.

Are there some configuration things I should be looking at? Should I look at configuring an rstudio server for my local computer too? If I have it serve off 127.0.0.1, traffic won't ever need to go beyond my local loopback interface, right? Thanks!

You've touched on the issues I've seen most often to cause this type of issue (shared drives), so I'm sorry I can't be more helpful.

The RStudio IDE team does review this category periodically, and I think they'll find helpful more detailed information about your system to better understand possible causes of this problem.

Sorry I can't be of more help.

1 Like

Aaah, okay, I will try to reproduce this later and get myself some logs to go with it.

The fact that this only happens when you're connected to the internet is a great clue. RStudio is really two processes (rstudio the front end and rsession on the back) that communicate over TCP/IP.

So my guess is that there's some software on your machine which routes all TCP traffic (even local) through e.g. an VPN or AV software when the network is up. If you're running anything that meets that profile, whitelisting those two processes (rstudio and rsession) may help.

1 Like

No VPN or AV software here.

Is there a type of traffic I should watch for? Like is there a way for me to generate simulated traffic like rstudio might be sending? Then I could Google tcpdump commands and try to figure out if funny business is afoot.

I haven't tried doing Rstudio with wifi connected and internet unplugged which seems worth doing too.

It is HTTP traffic, and you can use netstat -tulpn to investigate further. You'll find that rsession is listening on a local TCP port while RStudio is running; traffic going into/out of that port is what you want to watch.

2 Likes