更新Shiny Server Config以更改超时错误 [英] Updating Shiny Server Config to change timeout error
问题描述
我有一个内置了 downloadHandler
的闪亮应用程序,它适用于较小的数据集,但是当文件很大(330 MB)时,它就会超时并且出现错误.
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.
我发现了这个问题( shiny downloadHandler timeout ),尽管我没有回答,但似乎可以解决问题不知道如何更新配置文件以考虑 http_keepalive_timeout
.
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
.
以下是我的配置文件:
# 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
我将 http_keepalive_timeout
函数放在错误的位置.请参见下面的正确的 shiny-server.conf
更新:
I was putting the http_keepalive_timeout
function in the wrong place. Please see below for the correct shiny-server.conf
update:
# 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;
}
}
这篇关于更新Shiny Server Config以更改超时错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!