I have a shiny app with a downloadHandler
built in and it works great for smaller datasets but when the file gets large (330 MB), it times out and I get an error.
I found this SO question (shiny downloadHandler timeout) which seems to address the answer although I don't know how to update the config file to take into account http_keepalive_timeout
.
Below is my config file:
# Instruct Shiny Server to run applications as the user "shiny"
run_as shiny;
# Define a server that listens on port 3838
server {
listen 3838;
# Define a location at the base URL
location / {
# Host the directory of Shiny Apps stored in this directory
site_dir /srv/shiny-server;
# Log all Shiny output to files in this directory
log_dir /var/log/shiny-server;
# When a user visits the base URL rather than a particular application,
# an index of the applications available in this directory will be shown.
directory_index on;
}
}
Fixed it using this SO answer User session is getting interrupted after approx. 45 seconds
I was putting the
http_keepalive_timeout
function in the wrong place. Please see below for the correctshiny-server.conf
update: