代码之家  ›  专栏  ›  技术社区  ›  Kevin

更新闪亮服务器配置以更改超时错误

  •  1
  • Kevin  · 技术社区  · 7 年前

    我有一个闪亮的应用程序 downloadHandler 内置的,适用于较小的数据集,但当文件变大(330MB)时,它会超时,我会得到一个错误。

    我发现了这个问题( 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 回复  |  直到 7 年前
        1
  •  2
  •   Kevin    7 年前

    用这个答案修正了它 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;
    
      }
    }