UI grayed out for long running tasks unless interactivity took place



I’m currently doing some pretty time-consuming R analysis behind shinyproxy. I got this issue where the docker container is still active and running, however, the UI disconnected(grayed out) from the server. When I tried to reopen the app, it only loads the navbar and showing it’s busy. Shinyproxy log doesn’t have any information about what’s going on and the last line of the log is proxy activated for that app. The container log shows the R session is still running.

The long run function I’m using is Rsubread::align for sequence alignment. In my case, each align function takes about 10-15 minutes to return and it’s called in a for loop(usually around 10 iterations). If I interacted with the UI, then this issue will not happen.

Also, when I manually run the app by ‘docker run’, there is no issue.

One thing that I noticed is that the UI grayed out almost exactly after 10 mins(even if I changed the underlying dataset)

Below is the code block I’m using

observeEvent(input$runButton, {
for (…) { # around 10 iterations
long_running_task() # takes more than 10 minutes, involves writing files

Thanks a lot

Shiny apps time out/grey out after 10 minutes