sometimes code doesn't run in interactive rstudio-server environment

I have an ec2 instance that i use to host shiny dashboards and other ETL processes. I frequently edit and run code in the rstudio-server IDE hosted at port 8787. I have noticed that sometimes when running code interactively a given line of code will appear to execute properly(e.g no error, command prompt returns), but the objects it is supposed to create are not created. It never seems to happen to code running within a function or loop and as far as I can tell it never effects my cronjobs. Furthermore, when I run the same line again it usually works. So I imagine it is some failure in communication between R and RStudio? It seems most likely to occur when the line of code is especially demanding (e.g. using map_df(file_paths, read_csv), and it seems to happen either not at all during a given session, or quite frequently so I wonder if it happens when the instance (or R itself) is especially busy.

At any rate, I was wondering if anyone had ever seen something like this and could explain what might be happening and how best to avoid it.

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.