Is your container console or Kube-shell in Portainer closing on its own and you have published Portainer via reverse proxy?
This could be related to a time out setting in your reverse proxy and can be changed. Below are some examples of how this can be done for nginx based proxies.
Nginx Server:
add the following to the
nginx.conf
file.proxy_read_timeout 3600;
Change the value 3600
to match your requirement.
Nginx Proxy Manager:
Edit the proxy host that you need to change and add proxy_read_timeout 3600;
as below.
Change the value 3600
to match your requirement.
Nginx Ingress Controller (Kubernetes)
You need to add the following annotation to the Ingress objectnginx.ingress.kubernetes.io/proxy-read-timeout: 3600
Change the value 3600
to match your requirement.