Home  >  Article  >  Backend Development  >  Two nginx servers, php execution time problem

Two nginx servers, php execution time problem

WBOY
WBOYOriginal
2016-08-30 09:36:411224browse

There are currently two servers, one of which has a newly developed program, and the other one does not have a newly developed program. After entering the link in the browser, connect to the server with the code, and the browser processes the status of waiting for the result to be returned. A 404 error appears in the browser after 30 seconds. An unlimited timeout has been set in the php script, and the timeout for nginx is 5 minutes. It is suspected that it automatically connects to a server without new programs after 30 seconds. Please tell me how to solve this problem.

Reply content:

There are currently two servers, one of which has a newly developed program, and the other one does not have a newly developed program. After entering the link in the browser, connect to the server with the code, and the browser processes the status of waiting for the result to be returned. A 404 error appears in the browser after 30 seconds. An unlimited timeout has been set in the php script, and the timeout for nginx is 5 minutes. It is suspected that it automatically connects to a server without new programs after 30 seconds. Please tell me how to solve this problem.

I think in this case you should check the logs first

  1. Check the access log of nginx to see which server your request corresponds to.

  2. View the request timeout of php, nginx, php-fpm/php-cgi,

For this kind of problem, check the log file as mentioned above, check the access and error logs to see what happened. . Or is it something about the firewall, etc.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn