# Why is my console closing after a certain time?

### Is your container console or Kube-shell in Portainer closing on its own and you have published Portainer via reverse proxy? <a href="#hs_cos_wrapper_kb-article-module-4" id="hs_cos_wrapper_kb-article-module-4"></a>

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.

In below examples, change the value `3600` to match your requirement.\
\
**Nginx Server**:\
add the following to the `nginx.conf` file.

```
proxy_read_timeout 3600;
```

&#x20;\
**Nginx Proxy Manager:**

Edit the proxy host that you need to change and add `proxy_read_timeout 3600;` as below.<br>

<figure><img src="/files/f0kRyfDxgUuv8V8tpivL" alt=""><figcaption></figcaption></figure>

**Nginx Ingress Controller (Kubernetes)**\
\
You need to add the following annotation to the Ingress object\
`nginx.ingress.kubernetes.io/proxy-read-timeout: 3600`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.portainer.io/faqs/troubleshooting/logs-errors-and-debugging/why-is-my-console-closing-after-a-certain-time.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
