This function will attempt to start a virtuoso server
instance that can be managed completely from R. This allows
the user to easily start, stop, and access server logs and functions
from the R command line. This server will be automatically shut
down when R exits or restarts, or can be explicitly controlled using
vos_kill()
, vos_log()
, and vos_status()
.
Value
invisibly returns the processx::process()
object which can be used
to control the external process from R. It is not necessary for a user
to store this return object, as vos_start()
caches the process object so
it can be automatically accessed by other functions without needing to store
and pass the return object.
Details
It can take some time for the server to come up before it is ready to
accept queries. vos_start()
will return as soon as the server is active,
which typically takes about 10 seconds on tested systems. vos_start()
monitors
the Virtuoso logs every one second for a maximum time of wait
seconds
(default 30 seconds) to see if the server is ready. If wait
time is exceeded,
vos_start()
will simply return the current server status. This does not mean
that starting has failed, it may simply need longer before the server is active.
Use vos_status()
to continue to monitor the server status manually.
If no virtuoso.ini
configuration file is provided, vos_start()
will
automatically attempt to configure one. For more control over this,
use vos_configure()
, see examples.
Examples
# \donttest{
if(has_virtuoso()){
vos_start()
## or with custom config:
vos_start(vos_configure(gigs_ram = 3))
}
#> Warning: Exiting, virtuoso template not found... is virtuoso installed?
#> PROCESS 'virtuoso-t', running, pid 2923.
#> Server is now starting up, this may take a few seconds...
#> virtuoso isn't running.
#> Warning: Exiting, virtuoso template not found... is virtuoso installed?
#> Warning: Exiting, virtuoso template not found... is virtuoso installed?
#> PROCESS 'virtuoso-t', running, pid 2930.
#> Server is now starting up, this may take a few seconds...
#> virtuoso isn't running.
# }