Anonymous 08/14/2025 (Thu) 20:50 Id: a424d3 No.158004 del
8kun is down
Nginx 504 Timeout
A 504 Gateway Timeout error with nginx/1.18.0 (Ubuntu) indicates that the nginx server, acting as a proxy, failed to receive a timely response from the upstream server it was trying to reach.
This is a common issue when the backend server takes longer to process a request than the configured timeout limits allow.

The most frequent solution involves increasing the timeout values in the nginx configuration. For a proxy setup, key directives to adjust are proxy_connect_timeout, proxy_send_timeout, proxy_read_timeout, and send_timeout.
These can be set in the main nginx configuration file (/etc/nginx/nginx.conf) or in a dedicated configuration file like /etc/nginx/conf.d/timeout.conf.
Values such as 300 or 600 seconds are often recommended to resolve the issue.

If nginx is acting as a reverse proxy for a PHP application (e.g., using PHP-FPM), the fastcgi_read_timeout and fastcgi_send_timeout directives within the location ~ \\.php$ block of the virtual host configuration are also critical.
Increasing these values, for example to 150 or 300 seconds, can prevent timeouts during script execution.