portainer: container console freezes when using other apps or windows in the browser

Steps to reproduce the issue:

  1. open container console in portainer in chrome
  2. change to another tab or any application 3.return to console gets frozen, not able to type anything have to open new console

Any other info e.g. Why do you consider this to be a bug? What did you expect to happen instead?

Technical details:

  • Portainer version:1.13.2
  • Target Docker version (the host/cluster you manage):17.05
  • Platform (windows/linux):windows
  • Command used to start Portainer (docker run -p 9000:9000 portainer/portainer):
  • Target Swarm version (if applicable):1.13
  • Browser:chrome

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 20 (5 by maintainers)

Commits related to this issue

Most upvoted comments

Pretty sure the issue here (at least when NGINX is involved) is the proxy_read_timeout setting. For a long running socket connection like a websocket, if nothing is read from the proxied connection after 60 seconds (default) the connection will be closed. Once closed, there doesn’t seem to be any reconnect code on the client side, so the console is basically “dead”. I just bump up the setting to 7 days for the websocket path. Nothing lives on my desktop longer than that 😉

  location / {
    proxy_pass http://127.0.0.1:9000/;
    proxy_buffering off;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection $http_connection;
    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;
  }

  location /api/websocket {
    proxy_pass http://127.0.0.1:9000/api/websocket;
    proxy_read_timeout 10080m;
    proxy_buffering off;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection $http_connection;
    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;
  }

Thank you @Codelica , proxy_read_timeout is the answer