molgenis / molgenis-service-armadillo

Armadillo; a DataSHIELD implementation, part of the MOLGENIS suite
https://molgenis.github.io/molgenis-service-armadillo/
GNU Lesser General Public License v3.0
7 stars 10 forks source link

Rock sessions keeps memory used when not closed #523

Closed clemens-tolboom closed 1 year ago

clemens-tolboom commented 1 year ago

With docker-stats.R script running locally

#!/usr/bin/env Rscript

library(rockr)
conn <- rockr.connect(username="administrator", password="password", url = "http://localhost:6311")
#rockr.status(conn)

rockr.open(conn)
# rockr.eval(conn, quote(R.version))

# How many RServe processes are running
rockr.eval(conn, quote("library(magrittr)\nps::ps() %>%\ndplyr::filter(grepl(\"Rserve\", name)) %>%\ndplyr::count()"))

cat("Forgot to close?")
# rockr.close(conn)

cat("====== EOF Script")

forgetting the last connection close line then running shell script

#!/usr/bin/env zsh

# while true; do; ./docker-stats.R ; done
for i in (1 .. 5); do; ./docker-stats.R ; done
clemens-tolboom commented 1 year ago

Closing does helps. They should also be purged after 240 mins according to https://rockdoc.obiba.org/en/latest/admin/configuration.html#r-server-configuration

release-test.R does not close connections yet.

PR https://github.com/molgenis/molgenis-service-armadillo/pull/522 will have this added.

clemens-tolboom commented 1 year ago

Closing as #529 has more info albeit a duplication of this one :/