RStudio v1.1.447 crashes - Error: Unable to establish connection with R session (Ubuntu 18.04)

I have an R script that takes ~8 hours to run. I've been letting it run overnight in an RStudio session. Unfortunately, every morning when I try to check the results I get an Error: Unable to establish connection with R session message. I'm using the pblapply() function (it's the same as mclapply() but provides a progress bar) and running in parallel with the following cluster parameter cl = detectCores()-1.

My current workaround is to checkpoint my model objects via saveRDS() calls. Despite losing connection to my R session sometime before the next morning, the script appears to be running all of the way through, since all of the expected checkpoints are still being written to file. However, the RStudio console appears to be hanging on one of my parallel pblapply() progress bars. I usually return the next morning to see a frozen progress bar in the RStudio console from one of these pblapply() calls. Is it possible for RStudio to lose connection with the R session, but the session continues to execute? Is there something about running this job in parallel that affects connectivity?

Have any solutions been found to avoid these RStudio session disconnects?

OS: Xubuntu 18.04.2 LTS x86_64
Host: Dell Precision Tower 5810-01
Kernel: Ubuntu 18.04.2 LTS x86_64
RStudio Version: 1.1.447
RStudio Mode: Desktop
R Version: 3.4.4

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.