12.21 php-fpm pool 12.22 php-fpm Slow execution log 12.23 Open_b

Source: Internet
Author: User
Tags fpm

12.21 PHP-FPM's Pool

[[email protected] etc]# vim php-fpm.conf[[email protected] etc]# mkdir php-fpm.d[[email protected] etc]# CD php-fpm.d[[email protected] php-fpm.d]# vim www.conf[[email protected] php-fpm.d]# vim martin.conf[ Martin]listen =/tmp/martin.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[[email  Protected] php-fpm.d]#/etc/init.d/php-fpm restartgracefully shutting down php-fpm. Donestarting php-fpm done[[email protected] php-fpm.d]# ls/tmp/*.sock/tmp/martin.sock/tmp/mysql.sock/tmp/        Www.sock*[[email protected] php-fpm.d]# PS aux |grep php-fpm*root 1101 0.1 0.4 227292 4960?        Ss 14:07 0:00 php-fpm:master process (/usr/local/php-fpm/etc/php-fpm.conf) php-fpm 1102 0.0 0.4 227232 4716?        S 14:07 0:00 php-fpm:pool martinphp-fpm 1103 0.0 0.4 227232 4720? S 14:0:00 Php-fpm:pool Martin 
12.22 php-fpm Slow Execution log

Vim/usr/local/php-fpm/etc/php-fpm.d/www.conf
Request_slowlog_timeout = 1
Slowlog =/usr/local/php-fpm/var/log/www-slow.log
Touch/usr/local/php-fpm/var/log/www-slow.log
Configure Nginx Virtual host test.com.conf, change Unix:/tmp/php-fcgi.sock to Unix:/tmp/www.sock
Reload Nginx Service
/ETC/INIT.D/PHP-FPM restart
Curl-x127.0.0.1:80 test.com/sleep.php

12.23 Open_basedir


[[email protected] etc]#!vim
Vim php-fpm.d/www.conf
php_admin_value[open_basedir]=/data/ wwwroot/test.com:/tmp/
Modify php.ini file
Add error_log =/usr/local/php-fpm/var/log/php_errors.log
touch/usr/ Local/php-fpm/var/log/php_errors.log
chmod 777/usr/local/php-fpm/var/log/php_errors.log
/etc/init.d/ PHP-FPM Restart
curl-x127.0.0.1:80 test.com/3php-i
Tail/usr/local/php-fpm/var/log/php_errors.log
[[ Email protected] etc]# tail-2/usr/local/php-fpm/var/log/php_errors.log
[20-mar-2018 07:51:28 UTC] php Warning:phpinfo (): It is not safe for rely on the system ' s timezone settings. You is required to use the Date.timezone setting or the Date_default_timezone_set () function. In case you used any of those methods and you is still getting this warning, your most likely misspelled the timezone Iden Tifier. We selected the timezone ' UTC ' for now, but please set Date.timezone to select your timezone. in/data/wwwroot/test.com/3.php on line 2

12.24 PHP-FPM Process Management

12.21 php-fpm pool 12.22 php-fpm Slow execution log 12.23 Open_b

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.