Problem with RStudio Workbench pausing mid-job

I'm using RStudio Workbench (company has a license) to run long jobs over night. Trouble is, the job will run for a while then pause, sitting there waiting for me to come back. When I come back in the morning the job will resume. Which is very annoying. Haven't been able to figure it out.

Seems to usually pause during ggplot/ggsave operations. Or it might be related to saving a largish data file (1Gb).

Is there something that throttles/pauses jobs when the user is not logged in?

1 Like

You are posting on the RStudio Cloud category but talking about Workbench and it is a little confusing since they are two separate products. RStudio Cloud uses Workbench under the hood but the infrastructure is managed by them and they offer managed Workbench sessions that run on the cloud.

Workbench on the other hand is installed on premises and the infrastructure is managed by your organization, can you please clarify on what scenario you actually are?

Workbench. I'm a user not an admin so I don't know how stuff works under the hood. What tag should I be using I can't find one for Workbench.

I think #r-admin #rstudio-workbench might be a good place for this, the idea is to find the right audience for your question.

Also, since you are using a paid professional product you can reach out directly to costumer support.

1 Like

Could it be due to a custom package I'm using? I build the package locally and then use it in my script. Maybe there's some reason why Workbench pauses this.

I think it is unlikely, I believe the allowed background computing time is a configurable parameter but at the admin level. I'm not sure thought since I don't have access to Workbench.

1 Like

I have exactly the same problem right now. And we are not alone, I've found other posts with the same problem and no solutions, one from 2018 and another one more recent from september 2022.

And it's not limited to workbench, I'm working with Rstudio server on CentOS and my sessions always time out after 2-3 hours of inactivity. When I log back in, it resumes the computations. No need to specifiy how annowing the problem is when you have 24 hours + analysis to run...

The problem do not seem to be code dependant. Initially, I thought it was happening because I was using a loop, but I changed the loop for a function and I still have the same problem. I seems to stop anywhere in my process, regardless of what is running.

There suppose to be a setting to control the session end (explain in link in next post). However, it not suppose to pause when the session is running:

Also, I did changed this setting (with 0 and 240) with no success:
(showed in image in next post)

It really seems there is something wrong with rstudio server. I didn't have this problem before. I'm currently using rstudio server version 1.4.1717 (Juliet Rose) for CentOS 7. I'm suppose to switch to version 2022.07.2+576 soon (It's my IT department that have the power to change my version, not me), I'll test the same analysis with this version as well hoping the problem will be fixed.

2 Likes

As a new user, I wasn't allowed to post more than 2 link and 1 image, so here is the missing link and image:

rstudio-server options: https://support.posit.co/hc/en-us/articles/200552316-Configuring-RStudio-Workbench-RStudio-Server

The setting I use but still doesn't fix the problem:

1 Like

Thanks for the info!

Actually if I removed the part of my code that plotted the results on each run, the 10 hour job did complete successfully. So I think my problem is not a time-out, but related to ggplot, and possibly due to insufficient memory available for background sessions.

1 Like

That is interesting, like some section of the code would make Rstudio thinks it is idle. In my case, I have no ggplot call in my script. I'm running xgboost, gam (from mgcv), and some tidyverse data managment. I've notice that it seems to be pausing anywhere in the code, not always at the same function.

Also, it's not a memory problem because I have 256gb with plenty of room left.

I'll keep investigating.

1 Like

Are you sure this is RStudio dependent? Have you tried running your script from the terminal? (taking RStudio out of the picture).

Yes, that is actually what I'm trying right now. I am running the same script in a putty terminal. So far, it didn't idle. I guess I'll know for sure tomorrow, after a full night of not touching my computer, but so far, it points towards a RStudio problem.

1 Like

Have you configured the sending of "keep alive" packages in Putty? A broken ssh connection might interrupt your script execution.

The problem only happens when running my R script in RStudio. My putty session always stay active when running R. Actually, calling the same script in Base R from putty did work without pausing. At least that gives me a plan B for my long analysis.

Now, I've also tested a simple script (loop with randow data generation, a linear model and a ggplot graph) and it doesn't seems to pause. So there is probably a specific set of R functions and call that triggers the problem. I don't know what it is exactly, but at least it's not that frequent and it can be fix by bypassing Rstudio for long analysis.

1 Like

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.