Nginx + PHP-FPM Environment Deployment article:
http://blog.s135.com/nginx_php_v6/
About PHP-FPM's Baidu Encyclopedia introduction:
Http://baike.baidu.com/view/4168033.htm
The author in the actual use of this set of environment, encountered a strange problem, the specific description of the problem is:
When a browser requests a PHP page from a Web site, the post-start page needs to wait for the previous page to get response before it can start executing.
The problem is found, because the site of a page of the background interface problem, and did not set a time-out mechanism, causing the page to respond to turtle speed. While waiting for this page, and then open the other Site page is not open, to wait until this page returns, will be executed other pages.
After investigation, the problem is locked in the session, because the site uses its own MVC framework, the framework of the action before the execution, the default will be Session_Start (). Because the previous site is deployed on Apache, there will be no problem, but also buried the hidden trouble. When the company's webserver environment is migrated to Nginx, the problem should begin.
The specific reason is unclear, but it can be determined that the combination of the session and NGINX+PHP-FPM environment (has been determined by the experiment).
The solution is to modify the framework, close the default open session, in the need to session of the action class's constructor to open the session, although when such a page has concurrency, there will still be "session lock", I do not think of the professional name, Some people know the cause of the problem, welcome to the "question, but this kind of page in our site only a small part."
It's an interim solution.
The NGINX+PHP-FPM environmental performance described in the Zhang Yi article is very good, but as a relatively new solution, there may be some minor problems compared to the traditional approach of Apache + php-cgi.
I hope this article can give you some help.