> For the complete documentation index, see [llms.txt](https://docs.pritunl.com/kb/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pritunl.com/kb/zero/general/long-request-timeouts.md).

# Long Request Timeouts

By default an HTTP connection that is sending or receiving data will timeout after five minutes. A connection that is idle and not sending or receiving data will timeout after one minute.

### Increase File Limits

With a longer timeout more requests can be created and a larger open file limit will need to be configured. This will prevent the server from crashing when hitting the open file limit. After running the commands restart the server.

```shell
sudo sh -c 'echo "* hard nofile 100000" >> /etc/security/limits.conf'
sudo sh -c 'echo "* soft nofile 100000" >> /etc/security/limits.conf'
sudo sh -c 'echo "root hard nofile 100000" >> /etc/security/limits.conf'
sudo sh -c 'echo "root soft nofile 100000" >> /etc/security/limits.conf'
```

### Request Timeouts

To accommodate long requests such as large downloads or uploads the read and write timeout can be increased. Set the read and write timeout to the expected time that the longest request will take in seconds. The commands below will set a one hour timeout. The configuration is stored in the database and only needs to be run on one host in the cluster. Once set the web server on each of the nodes will automatically restart after a few seconds. This can be seen in the logs which will also show the timeout in the starting server event.

```shell
sudo pritunl-zero set router read_timeout 3600
sudo pritunl-zero set router write_timeout 3600
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.pritunl.com/kb/zero/general/long-request-timeouts.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
