There is a script on the VPS, which runs once a day. When executing exactly 60 seconds, 504 Gateway Time-Out issues 504
HTACESS is registered:
PHP_VALUE MAX_EXECTION_TIME 800.
PHP_VALUE MAX_INPUT_TIME 800.
php_value proxy_send_timeout 800.
PHP_VALUE PROXY_READ_TIMEOUT 800.
PHP_VALUE PROXY_CONNECT_TIMEOUT 750
And nothing changes, at least phpini () and issues loyal meaning
Where to dig?
Answer 1, Authority 100%
Most likely you get a 504 Gateway Time-Out error from the Apache server, then you can try to change the Timeout option, is located in the web server configuration file, most often it is either httpd.conf or httpd-default.conf. Find these files and change this option:
# Timeout: The Number of Seconds Before Receive and Sends Time Out.
#
TimeOut 60.
There is one note according to your algorithm: such scripts should not be launched from the HTTP interface, but must be executed from the command line, for example, by CRON. Put such crazy values for all scripts on the server, it’s the way to nowhere. Imagine that something has become done for a very long time, and customers have entered this address, the entire server pool may be scored under load, and new customers will simply be able to go to your project.
Answer 2
Gateway Time-Out can also occur when NGINX is used as a proxy server. For example, when working with Apache. In order to avoid problems, you need to configure the waiting time parameters when proxing:
Server {
...
proxy_connect_timeout 600;
proxy_send_timeout 600;
proxy_read_timeout 600;
Send_Timeout 600;
...
}