首页 文章

根据闪亮服务器的开放版本从Shiny app下载文件时防止超时

提问于
浏览
1

我创建了应用程序,除其他外,创建了添加自定义水印的提供网址的屏幕截图 .

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

根据我的研究,我尝试修改shiny-server.conf文件并添加 http_keepalive_timeout 50000; ,如下所示:

# 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版本,还是正常工作,下载问题出在其他地方?

1 回答

  • 0

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

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

相关问题