gpt4 book ai didi

linux - 更新 Shiny 的服务器配置以更改超时错误

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:04:01 24 4
gpt4 key购买 nike

我有一个 Shiny 的应用程序,内置了一个 downloadHandler,它适用于较小的数据集,但当文件变大 (330 MB) 时,它会超时,我会收到错误消息。

我发现这个 SO 问题 ( 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;

}
}

最佳答案

使用此 SO 答案修复它 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;

}
}

关于linux - 更新 Shiny 的服务器配置以更改超时错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51520166/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com