【问题标题】:Slow loading shiny apps缓慢加载闪亮的应用程序
【发布时间】:2018-07-28 23:11:52
【问题描述】:

我在远程 Centos 服务器上安装了 shiny-server。 闪亮的配置如下所示:

# Instruct Shiny Server to run applications as the user "shiny"
run_as <user>;
# 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;
}
}

每当我将闪亮的应用程序文件放在/srv/shiny-server 文件夹中时,它都能很好地加载。 但是我尝试创建一个文件夹,然后使用文件路径来调用不同的应用程序,但它们需要永远加载。

为了使用路径在一台服务器上部署多个应用程序是否缺少某些东西?

【问题讨论】:

  • 您应该将应用程序放置在/srv/shiny-server 下的可能分层结构中。例如,/srv/shiny-server/app1/app.R 可通过 localhost:3838/app1 访问

标签: shiny shiny-server


【解决方案1】:

后来我发现更快的方法是在/srv/shiny-server中创建一个文件夹,然后添加一个符号链接到:/opt/shiny-server/foldername 然后,您会将您的应用程序存储在第二个位置并从第一个位置调用它们。 加载速度现在好了一点。当然,这也取决于您的代码的效率。

【讨论】:

    猜你喜欢
    • 2019-05-28
    • 2016-11-01
    • 1970-01-01
    • 2017-01-15
    • 2018-11-20
    • 1970-01-01
    • 2018-12-02
    • 2017-06-04
    • 1970-01-01
    相关资源
    最近更新 更多