PHP-FPM pool php-fpm Slow execution log open_basedir PHP-FPM process Management

Source: Internet
Author: User
Tags fpm

php-/usr/local/php/etc/php-fpm.conf// add include = ETC/PHP-FPM.D/* in the [Global] section . conf mkdir/usr/local/php/etc/php-fpm.d/cd/usr/local/php/etc/php-fpm.d/vim www.conf//content as follows [Www]listen =/tmp /www.socklisten.mode=666user = Php-fpmgroup = PHP-FPMPM = Dynamicpm.max_children = 50pm.start_servers = 20pm.min_spare_ Servers = 5pm.max_spare_servers = 35pm.max_requests = 500rlimit_files = 1024 • Continue editing the configuration file vim xiaobo.conf//content as follows [Aming]liste n =/tmp/xioabo.socklisten.mode=666user = Php-fpmgroup = PHP-FPMPM = Dynamicpm.max_children = 50pm.start_servers = 20PM.MI N_spare_servers = 5pm.max_spare_servers = 35pm.max_requests = 500rlimit_files = 1024/usr/local/php/sbin/php-fpm–t/et C/INIT.D/PHP-FPM Restart

php-fpm Slow execution log vim/usr/local/php-fpm/etc/php-fpm.d/www.conf//Add the following:Request_slowlog_timeout =1Slowlog=/usr/local/php-fpm/var/log/www-slow.log Configure Nginx Virtual host test.com.conf, put Unix:/tmp/php-fcgi.sock Change to unix:/tmp/Www.sock re-loading Nginx service vim/data/wwwroot/test.com/Sleep. php//write the following:<?phpEcho"Test slow Log";Sleep(2);Echo“ Done”;? >Curl-x127.0.0.1: thetest.com/Sleep. PHPCat/usr/local/php-fpm/var/log/www-slow.log

/usr/local/php-fpm/etc/php-fpm.d/xioabo.conf// Add the following content php_admin_value[open_basedir]=/data/ wwwroot/xiaobo.com:/tmp/• Create a test PHP script, test it • Change xiaobo.conf again, modify the path, test again • Configure error log VI /USR/LOCAL/PHP-FPM /etc/== =/usr/local/php-fpm/var/log/-x127. 0.0. 1: test.com/1. PHP View error log cat /usr/local/php-fpm/var/log/ Php_errors.log
php-FPM Process Management PM= Dynamic//dynamic process Management, can also be staticPm.max_children = - //Maximum number of sub-processes, PS aux can be viewedpm.start_servers = - //number of processes that will start when the service is startedpm.min_spare_servers =5 //defines the minimum number of child processes in the idle period, and if this value is reached, the PHP-FPM service automatically derives the new child process. pm.max_spare_servers = * //defines the maximum number of child processes in the idle period, or, if higher than this value, begins to clean up idle child processes. Pm.max_requests = -  //defines the maximum number of requests processed by a child process, meaning that at most one php-fpm child process can handle so many requests, and when this value is reached, it exits automatically. 

PHP-FPM pool php-fpm Slow execution log open_basedir PHP-FPM process Management

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.