我有一个内置downloadHandler
的闪亮应用程序,它对于较小的数据集非常有用,但是当文件变大(330 MB)时,它就会超时并且出现错误。
我发现了这样的问题(shiny downloadHandler timeout),尽管我不知道如何更新配置文件以考虑到http_keepalive_timeout
,它似乎可以解决问题。
下面是我的配置文件:
# 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;
}
}
答案 0 :(得分:2)
使用此答案User session is getting interrupted after approx. 45 seconds
修复了该问题我将http_keepalive_timeout
函数放在错误的位置。请参见以下正确的shiny-server.conf
更新:
# Instruct Shiny Server to run applications as the user "shiny"
run_as shiny;
http_keepalive_timeout 180;
# 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;
}
}