-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cannot use source or eval in Rserve.conf or in backend$start as additional args #192
Comments
The source("startup.R") in |
So that's what we basically had been doing. We loaded in a data file that was about 250 MB before starting the application. This data file was used in a read-only manner by one of the route functions. However, our memory was spiking at the rate of ~ 1 GB per every 4 concurrent requests. We were wondering if we needed to preload it in a different way and tried to go down this path of using Regardless of the particular shenanigans we were up to, should it be possible to pass in Thanks for taking the time to respond! |
Likely you do something in the request handler which causing high memory usage / copying of large objects. As Simon suggested you can load data with
What is the use case? You can provide most of the Rserve config parameters when calling |
@kevinnowland Please note that standard Linux tools (like And, no, you cannot use |
Thank you everyone for the responses! Very helpful. |
Hello! I have been trying to take advantage of pre-loading data
via the
source
and / oreval
arguments inRserve
for anapp that is using
RestRserve
. The ideas was to prevent memory spikeswhen receiving many concurrent requests by pre-loading objects before
the forking happens.
The following set of files give an example setup that is not working
as I would have thought. This is using
RestRserve_1.1.1
.Dockerfile
which is built with the command
server.R
docker-compose.yaml
I have been starting the image using
docker-compose up
with the followingdocker-compose.yaml
filewhich loads
Rserve.conf
to/etc/Rserve.conf
(tried also asRserv.conf
).The server starts up fine.
Rserve.conf
orRserv.conf
Then I am trying to configure
Rserve
using the followingfile which gets put into the image at runtime to
/etc/Rserve.conf
(I have also tried
/etc/Rserv.conf
without the e):Which should be referencing the following file
startup.R
However, I cannot see either the statement getting printed in the
docker-compose logs and cannot use the variable
x
in the ping route, forexample.
Any help would be appreciated. Thank you!
The text was updated successfully, but these errors were encountered: