RStudio Pro IDE intermittent hangs

Dear all,
I'm hosting RStudio Pro on a linux server. Recently, I've seen intermittent lag when executing commands: every 10th command or so hangs for 5-10 seconds, irrespectively of the command (e.g., it doesn't depend on the compute cost of the command). There's no apparent CPU or memory load on the server.
Two questions:

  • What could cause this?
  • How could I write R code that would time commands run from the console in RStudio, timing the execution time, but taking console lag time into account? This would allow for monitoring lag while attempting to locate the problem.

Thanks again

1 Like

There’s microbenchmark

If the same code gives inconsistent results with the same background processes, or ideally with as few daemons as possible to eliminate race conditions, I’d expect some type of caching problem and do a reinstall. That’s a guess, because I’m not knowledgeable about the internals.

Since you're using RStudio Pro, you are entitled to e-mail support -- please email your question to support@rstudio.com and we'll help you investigate!

Re: what could cause what you're seeing, the most common source of this kind of issue is RStudio's console auditing feature. When enabled (it's off by default), every R command is sent to a log file. If that log file is stored on another machine or on a high latency disk, it can cause commands to take a long time to execute while they stack up waiting for the disk. Check with your admin:

https://docs.rstudio.com/ide/server-pro/auditing-and-monitoring.html#auditing-configuration

1 Like

Hey Jonathan,
Thanks for the answer. There's no auditing enabled on our instance.
The lag is apparent in the RStudio Server Pro IDE in the browser, but I have a hard time figuring out, if this is latency on the server/RProcess, or in the network communication between the browser and the server. Do you know of a clever way to deduce this?

Thanks

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.