Error HTTP 503 with Nginx Reverse Proxy

Hello,
we have a Shiny Dashboard with ShinyProxy behind a Nginx Reverse Proxy and receive HTTP error 503 from time to time randomly on different assets (css or js). We tried with versions of ShinyProxy from 2.3 up to 2.5. We have no load balancer, and also disabling logging as mentioned in a similar issue didn’t help.

application.yml

proxy:
  title: Shiny-Dashboard
  logo-url: /Logo_BW.png
  landing-page: /
  hide-navbar: true
  heartbeat-rate: 10000
  heartbeat-timeout: 900000
  port: 8080
  authentication: simple
  admin-groups: dev
  container-log-path: /home/shinyproxy/logs/container-logs

  users:
  - name: achim
    password: zyx
    groups: dev

  docker:
    cert-path: /home/none
    url: http://localhost:2375
    port-range-start: 20000

  specs:
  - id: headers
    display-name: HEADER Dev
    description: HEADER Development Version
    container-cmd: ["R", "-e", "HEADERDashboard::launchHEADERDashboard(log_level = 'debug')"]
    container-image: header-dashboard
    container-volumes: [ "/etc/shinyproxy/config/config.yml:/config.yml", "/etc/shinyproxy/config/role_config.yml:/role_config.yml" ]
    container-env:
      CONFIG_PATH: /
    access-groups: [dev]

logging:
  file:
    name: /home/shinyproxy/logs/shinyproxy.log

server:
  contextPath: /headers
  servlet:
     context-path: /headers

nginx configuration

location /headers {
           proxy_http_version 1.1;
           proxy_set_header Upgrade $http_upgrade;
           proxy_set_header Connection "upgrade";
           proxy_read_timeout 600s;
           proxy_redirect    off;           proxy_set_header  Host             $http_host;
           proxy_set_header  X-Real-IP        $remote_addr;
           proxy_set_header  X-Forwarded-For  $proxy_add_x_forwarded_for;
           proxy_set_header  X-Forwarded-Proto $scheme;
}

Any help is welcome.
Best,
Achim

Hi

We recently have experienced similar issues and we think we found the root cause. You can find all information related to this issue here: https://shinyproxy.io/faq/#the-assets-of-my-shiny-app-sometimes-fail-to-load-http-error-503

Could you be so kind to report back whether this solves the issue? Let me know if you need more information to implement the solution (so that I can update the FAQ).

Hi,
and thanks a lot for this solution.After some tests it seems to me, that this really solved the issue.

Best,
Achim

1 Like