A 502 means nginx got no answer from PHP; a 504 means PHP took too long. Either the PHP pool is down or busy, or one request is very slow.
| Cause | How to tell | Fix |
|---|---|---|
| PHP pool down | Services: the store's php8.x is not active | Restart it |
| All PHP workers busy | PHP error log: server reached pm.max_children; often bots | Check Traffic and Protection; then tune workers. |
| A slow request | PHP slow requests log shows the same code each time | Fix the slow code or raise max_execution_time for that one task |
| Out of memory | Memory graph at the top, swap high | See out of memory. |
| Database stuck | mariadb not active, or long queries | Restart mariadb; ask us to check locks |
504 on a long admin action (import, export, reindex)? Run it from the command line or the Actions tab, where there is no browser timeout.
Did this solve it? If not, tell us what you see and we look at your server.
Open a ticket