Using PHP today to execute a very time-consuming file "PS: self-useful, about 3 minutes"
But the execution is shown after one minute
Nginx 504 Gateway Time-out
So modify Max_execution_time = 1200 in the php-ini.php, restart PHP, or no use
Suddenly understand that if the timeout is a problem with PHP settings, the following error will be reported
Fatal error:maximum execution time of seconds exceeded in E:\ceshi\001\map.php on line 27
So the problem is on Nginx, sweat, above is not said Nginx 504 it;
Go on, mom.
Found an article about Nginx configuration "nginx.conf"
There are some of this configuration
#设定http服务器http {include mime.types; #文件扩展名与文件类型映射表default_type application/octet-stream; #默认文件类型 #charset UTF-8; #默认编码server_names_hash_bucket_size -; #服务器名字的hash表大小client_header_buffer_size 32k; #上传文件大小限制large_client_header_buffers464k; #设定请求缓client_max_body_size 8m; #设定请求缓sendfile on; #开启高效文件传输模式, the sendfile instruction specifies whether Nginx calls the Sendfile function to output the file. For normal applications set to ON, if used for downloading applications such as disk IO heavy load applications, can be set to off to balance the disk and network I/o processing speed, reducing the load on the system. Note: If the picture does not appear normal, change this to off. AutoIndex on; #开启目录列表访问, the appropriate download server, the default shutdown. Tcp_nopush on; #防止网络阻塞tcp_nodelay on; #防止网络阻塞keepalive_timeout -; #长连接超时时间, units are seconds #fastcgi related parameters are to improve the performance of the site: reduce resource consumption, improve access speed. The following parameters can be understood by literal means. Fastcgi_connect_timeout -; Fastcgi_send_timeout -; Fastcgi_read_timeout -; fastcgi_buffer_size 64k;fastcgi_buffers464k;fastcgi_busy_buffers_size 128k;fastcgi_temp_file_write_size 128k;}
So the fastcgi_connect_timeout in their nginx configuration to change the value of a bit, OK
Read the letters and you'll understand.
Nginx 504 Gateway Time-out solution