Score:0

R processes stuck in memory from last Jupyter in VS Code session

vn flag

I have noticed that I often will have multiple R processes still running, and occupying a significant amount of RAM, even if I closed all applications that I use for R.

For the most part I use VS Code with the Jupyter extension, and based on the commands running (below) the lingering R sessions are seemingly remnants of the last Jupyter session in VS Code. (I open RStudio or JupyterLab from time to time, as I recently switched and I need it for comparison.)

To see if this issue was reproducible elsewhere, I opened JupyterLab, and the same issue persists here. Multiple R sessions are initiated (presumably due to several tabs open in the IDE. However, they are not terminated when closing.) It could seem the problem is Jupyter related, however, I have also seen other programs, such as Evolution, have the same issue.

I am wondering if this is operating system related (running Ubuntu 20.04 LTS) or software specific. In either case, I am looking for a solution that will kill all related processes when the application is closed.

enter image description here

As the picture shows, they occupy roughly 4 GB of the available memory, so it's not exactly peanuts. Checking the process properties, I could see that the following commands are running (some are duplicated):

  1. Process ID 203329 and 203327
/usr/lib/R/bin/exec/R --slave -e IRkernel::main() --args/tmp/tmp-1362468kUQHDQHd8fJ.json
  1. Process ID 14177 and 18379
/usr/lib/R/bin/exec/R --slient --slave --no-save --no-restore -f /home/user/.vscode/extensions/ikuyadeu.r-2.3.5/R/help/helpServer.R
  1. Process ID 9667 and 13358
/usr/lib/R/bin/exec/R --slave -e IRkernel::main() --args/tmp/tmp-9630S3jb7T9Q3FPt.json
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.