Keep libraries in memory even when all browsers are closed

I have the free version of shiny server and a shiny app that uses a fair number of libraries which results in a slow calculation time. I placed them all in a global.R file so that they can be shared across users.

# All libraries are in global.R for faster start times
source("<path to global.R>", local = T)

ui <- fluidPage(
)

server <- function(input, output, session) {
}

shinyApp(ui, server)

With this setup, the first person to access the app from a browser has a longish wait (~10s). Subsequent visits by different users are fast. If everyone closes their browser, the next user to come along will wait ~10s for the app to calculate.

Is there a way to configure things so that even the first user has a short wait time because the libraries are already in memory?

I think the result I'm looking for would be as if I had a browser tab open all the time pointing to my public shiny app and I hit reload and calculate once (to add the libraries that are not added when the ui starts up). Whenever the app times out and turns grey, I reload and calculate again.

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.