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

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

Edit (2022-04-19)

This issue has been tracked as bug on the extensions GitHub pages.

2 Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like