shiny - Terminating (graciously) MonetDB process in R -
i'm using monetdb on variety of platform (e.g. os x , linux centos) shiny application.
it difficult disconnect db times, approach terminate shiny app without disconnecting db.
this means shiny app before accessing data tries stop "old" process with:
monetdb.server.stop(pid)
from source of command understand kills process associated pid
provided (which means among other things user running app must have access kill
function).
this works ok of times, when try start monetdb again, get
!fatal: gdklockhome: database lock '.gdk_lock' denied warning in socketconnection(host = host, port = port, blocking = true, open = "r+b", : localhost:50000 cannot opened error in socketconnection(host = host, port = port, blocking = true, open = "r+b", : cannot open connection
is there way avoid error (without forcibly disconnecting database time use in shiny)?
it can indeed take couple of seconds monetdb shut down. if new process started on same dbfarm
directory in meantime, !fatal: gdklockhome: database lock '.gdk_lock' denied
error. i'm considering adding wait
parameter monetdb.server.stop
.
so in meantime, waiting bit before server started again idea. otherwise, consider using monetdbd
manage monetdb servers.
Comments
Post a Comment