← Back to all fixes
Nginx 504 Gateway Timeout
The Issue
Some requests return 504 Gateway Timeout after 60 seconds.
Root Cause
The upstream app is taking longer than nginx's `proxy_read_timeout` (default 60s) to respond.
How to Fix
Increase timeout in nginx config: `proxy_read_timeout 120s;` inside the location blockAlso set: `proxy_connect_timeout 60s;` and `proxy_send_timeout 60s;`Reload nginx: `sudo systemctl reload nginx`Investigate why the app is slow — the timeout is a workaround, not a fixAdd request tracing to find slow database queries or external API calls