【问题标题】:Prevent timeout when downloading file from Shiny app based on open version of shiny server基于闪亮服务器的开放版本从闪亮应用下载文件时防止超时
【发布时间】:2018-11-14 20:41:39
【问题描述】:

我创建了一个应用程序,其中包括创建提供的 URL 的屏幕截图,并添加了自定义水印。

在本地版本上一切正常。当放在闪亮的服务器上时,它可以正常工作......直到一次提供太多网址。应用程序不会冻结,要下载的文件是在 VM 上创建的,闪亮的服务器可以在该 VM 上运行,但不会发生下载。

根据我的研究,我尝试通过添加 http_keepalive_timeout 50000; 来修改 shiny-server.conf 文件 如下图:

# Instruct Shiny Server to run applications as the user "shiny"
run_as shiny;
http_keepalive_timeout 50000;
# 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 并将其放在其他行中。此选项是否仅适用于 PRO 版本,或者它是否正常工作并且下载问题在其他地方?

【问题讨论】:

    标签: r shiny timeout shiny-server


    【解决方案1】:

    显然我无法测试任何东西,但您可以尝试增加app_idle_timeout 的值(请参阅http://docs.rstudio.com/shiny-server/#application-timeouts)。

    我知道对于我的一个应用程序,生成下载文件似乎应该与创建下载文件分开进行,因为这会减少空闲时间。我希望这会有所帮助,但请提供一个可重现的示例供我测试,因为我对闪亮服务器的开放和专业版本有一些经验。

    【讨论】:

      猜你喜欢
      • 2017-01-13
      • 1970-01-01
      • 2016-05-23
      • 2020-01-26
      • 1970-01-01
      • 2022-10-05
      • 1970-01-01
      • 2016-06-01
      • 2018-11-08
      相关资源
      最近更新 更多