The server needs to perform a long time request processing, 504 will appear, and the server configuration cannot be changed. The request result is not important. I want to know if the processing code will continue to execute if it is 504. If it doesn't work, is there any good way? The backend is written in PHP Yii.
The code will not continue to execute, because the code cannot get the request, so 504Gateway Time-out will appear
504 Gateway Time-out literally means, we can understand it as a web page request timeout, and it is also a request made when browsing the website web page. Response or non-response, at the website program level, means that the request fails to execute the corresponding PHP-CGI program, or the PHP-CGI program fails to perform corresponding processing, or the response processing result of the CGI program fails to be fed back to The browser may fail to provide timely feedback to the browser.
You can check out the details: http://host.zzidc.com/wljc/12...
No, 499 interrupt request
If PHP needs to perform a long-time task, please write what you need to write to the command folder under the yii project, and then use Linux's crontab scheduled task for scheduled execution, so that it can be executed in the background. If It is more troublesome to request execution through the front end.