# 504 Gateway Time-out

This is a classical error from the nginx webserver which is used on default hostware environments.

## Cause

The cause of this error depends on the action which is being executed:

* When a PDF gets generated in the administration, the PDF propably has lots of entries. In that case, the PDF generator needs more execution time than allowed by nginx.

## Adjust configuration

To fix this issue, adjust the configuration of your nginx and php config.

```
nano /etc/php/8.3/fpm/php.ini
```

Press CTRL + W and search for "max\_execution\_time" in the file. Press enter to find that line.

The default value is 30 seconds. Adjust as needed, for example to 180 for 3 minutes.

Restart PHP and nginx:

```
systemctl restart php8.3-fpm nginx
```


---

# 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.hostware.io/system-and-configuration/troubleshooting-and-questions/504-gateway-time-out.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.
