现在我在一个闪亮的应用程序的global.R
文件中加载大约100mb的数据。虽然应用程序在本地运行良好,但Shiny Server会定期崩溃。通常罪魁祸首是以下错误(等待应用加载约30秒后):
An error has occurred
The application failed to start.
The application took too long to respond.
我已尝试app_init_timeout
的所有可能设置,包括设置为-1但仍然没有运气。
我想知道是否存在可以在Shiny Server会话中加载的数据量的上限。
这是闪亮的服务器配置文件的样子:
# 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 /vagrant/sites/;
# 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 :(得分:0)
您可能需要调整应用程序的Shiny Server app_init_timeout
参数:
每个Shiny应用程序都有两个与之相关的超时:
app_init_timeout - 描述等待的时间(以秒为单位) 申请开始。如果R过程这么多秒之后 仍然没有变得敏感,它将被视为不成功 启动和连接将被关闭。
您没有说明您运行它的基础架构类型,但如果它是EC2,那么您可能希望获得更大的实例。
答案 1 :(得分:-2)
我有同样的问题。尝试释放闪亮保存文件的文件夹的权限
访问文件夹的属性,选择“递归设置组,所有者和权限”选项并输入“Octal”0777。