automatically restarted when the number of requests processed by a php-cgi process accumulates to 500.But why restart the process?Generally in the project, we will more or less use some PHP third-party libraries, these third-party libraries often have a memory leak problem, if you do not periodically restart the php-cgi process, it is bound to cause memory usage
number of times to ensure that the amount of memory is not increased.It is because of this mechanism, in high-concurrency sites, often lead to 502 of errors, I guess the reason is that php-fpm to the request from NGINX queue is not handled well. However, I am still using PHP 5.3.2, I do not know if there is a problem in PHP
current spawn-fcgi download address is http:// REDMINE.LIGHTTPD.NET/PROJECTS/SPAWN-FCGI, the latest version is http://www.lighttpd.net/download/spawn-fcgi-1.6.3.tar.gz.
Note: The latest spawn-fcgi can go to the Lighttpd.net Web site to search "spawn-fcgi" to find its latest version of the release address.
5) contrasting php-fpm and spawn-fcgi
PHP-
requests to ensure that the amount of memory is not increased.
Precisely because of this mechanism, in the high concurrency of the site, often led to 502 errors, I guess the reason is php-fpm to the request from the NGINX queue did not deal well. However, I am currently using PHP 5.3.2, do not know if there is still this problem in the
"spawn-fcgi".Comparison of PHP-FPM and spawn-cgiThe PHP-FPM is very convenient to use, the configuration is in the Php-fpm.ini file, and the start, restart can be done from the PHP/SBIN/PHP
PHP-FPM and spawn-cgi
The PHP-FPM is very convenient to use, the configuration is in the Php-fpm.ini file, and the start, restart can be done from the PHP/SBIN/PHP-
Some misunderstandings about max_chin.pdf of php-fpm
At present, nginx + fpm is basically the mainstream configuration, among which we are more concerned with the configuration of pm. max_chin.pdf
First, let's focus on a prerequisite: pm = static/dynamic,
This option identifies the generation mode of the fpm sub-proces
handle the Request queue from NGINX. However, I am still using PHP 5.3.2. I don't know if this problem still exists in PHP 5.3.3.At present, our solution is to set this value as much as possible, as much as possible to reduce the number of PHP-CGI re-SPAWN, but also can improve the overall performance. In our actual p
Recently it has been a tangle of performance analysis and tuning how to start with hardware first, or from code or database first. From the operating system (CPU scheduling, memory management, process scheduling, disk I/O), Network, Protocol (HTTP, TCP/IP), or from application code, database tuning, middleware configuration and so on.Single middleware also sub-we
connection-oriented protocol such as TCP can guarantee the correctness and completeness of the communication.Of course, the above is a semi-understanding of the theoretical analysis plus subjective speculation, the specific difference or to pass the test data to speak, and later, will do this test. My theoretical analysis of the test data from other bloggers on the internet is almost right. As for which way you choose, I can only say "fish and bear paw can not have both", through the superb tra
.rpm found that all PHP dependent dependencies were upgraded to the corresponding version ...Rpm-q PHPPhp-5.4.16-42.el7.x86_64All right, PHP-FPM, put it on.2, in fact, not so complicated. So keep the original version does not move, directly find the PHP version corresponding to the
FastCGI in the form of mod_fcgid. FastCGI can be used on other Web servers, such as lighttpd, nginx, Cherokee, and Microsoft IIS. With FastCGI, you can set multiple PHP versions at the same time, which is useful in some cases.
FastCGI also uses suexec to support different users using their own PHP instances. This feature is especially important for improving security in a shared environment. FastCGI reduce
This article introduces the content is about CGI, fastcgi, php-cgi, PHP-FPM analysis, has a certain reference value, now share to everyone, the need for friends can refer to
Defined
First of all, what does CGI do? CGI is designed to ensure that the data passed by the Web server is in a standard format and facilitates the writer of CGI programs.
Web server, su
: This article mainly introduces the Nginx performance tuning course for performance testing. if you are interested in the PHP Tutorial, please refer to it. Performance testing-performance tun
"> proxyset disablereuse=off SetHandler proxy:fcgi://php-fpmAt this point configure PHP-FPM end on Apapche:Service php-fpm startservice httpd RestartA man of good character will not see the error message. If the PHP file on
CGI is a protocol that specifies that the server nginx will send that data to php-cgiFastCGI can also be said to be an agreement. FastCGI is an improvement in the performance of CGI. FastCGI starts a master, parses the configuration file (php.ini, etc.), initializes the execution environment, and then starts multiple workers, and when the request comes in, master passes it to a worker and waits for the next
/test.net/framework/web/CController.php:266
2251run()/www/test.net/framework/web/CWebApplication.php:276
1799translate()/www/test.net/application/libraries/Limesurvey_lang.php:118
1786load_tables()/www/test.net/application/third_party/php-gettext/gettext.php:254
1447runController()/www/test.net/framework/web/CWebApplication.php:135Parameter interpretation: Sort: Sorting words
Uniq-c: Displays unique rows and the number of occurrences of the ba
, the master can start several workers in advance according to the configuration. of course, when there are too many idle workers, some will also be stopped, which improves performance and saves resources. This is how fastcgi manages processes.
What is PHP-FPM? It is a program that implements Fastcgi and is officially accepted by
enough, master can pre-boot several workers according to the configuration and so on, of course, the idle worker too much, will also stop some, this improves the performance, also saves the resources. This is FastCGI's management of the process.What is that php-fpm? is a realization of the FASTCGI program, by the PHP
enough, master can pre-boot several workers according to the configuration and so on, of course, the idle worker too much, will also stop some, this improves the performance, also saves the resources. This is FastCGI's management of the process.What is that php-fpm? is a realization of the FASTCGI program, by the PHP
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.