更新Shiny Server Config以更改超时错误

时间:2018-07-25 13:29:55

标签: linux ubuntu shiny shiny-server

我有一个内置downloadHandler的闪亮应用程序,它对于较小的数据集非常有用,但是当文件变大(330 MB)时,它就会超时并且出现错误。

我发现了这样的问题(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;

  }
}

1 个答案:

答案 0 :(得分:2)

使用此答案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;

  }
}