Search code examples
rrstudio-server

In R, what can cause the "options" file in the suspended-session-data folder to grow too large?


So, I'm sorry if this question is not reproducible, but it's actually because I don't know what is causing my problem. I run R in an RStudio Server in Linux, and recently I'm facing the following problem:

When my R session is suspended (after timeout, for example), sometimes the options file in the suspended-session-data folder grows enormously - 400 GB, for example.

If this was the environment file, it would be more intuitive, as it would simply mean that my session had too much data loaded and R tried to save it during timeout. However, I currently have no clue as to why this problem would happen with the options file, and since the file is too large, I'm not able to read it in order to understand what could have gone wrong. I also couldn't find any documentation regarding this file online.

My /etc/rsession/rsession.conf currently looks like this:

# R Session Configuration File

session-timeout-minutes=60
session-save-action-default=no

Is there an obvious reason as to why the options file would grow too large? If not, is there a good way to debug the problem?

Thank you


Solution

  • I had a similar problem. It seems to be related to this issue in cpp11.

    Briefly, when using save() on options()["cpp11_preserve_env"] this leads to some weird recursion.

    I managed to fix it in my installation by:

    1. Making sure the cpp11 package is up-to-date (install.packages("cpp11")).
    2. Reinstalling the readr package (install.packages("readr")).