The default is to use the local installation path
cd/usr/local/php/etc/
Vim php-fpm.conf
; TheLog file forslow requests;DefaultValue:Not set; Note: Slowlog is mandatoryifRequest_slowlog_timeout is Setslowlog=Log/pool.Log.Slow//can modify the path of the slow log; The timeout forserving a single request after which a PHP backtrace would be, dumped to the' Slowlog 'file. A value of ' 0s ' means ' off '.; Available units: S (econds) (default), M (inutes), H (ours),or D (ays);Defaultvalue:0Request_slowlog_timeout= 1//Slow log time-out
But the directory needs to be created manually, or the restart PHP-FPM will be wrong
Mkdir/usr/local/php/log
PHP-FPM Slow Log example, the slow log will record the process number, the script name, which file which line of code which function execution time is too long.
View slow log files tail-10f pool.log.show
[19-sep-2014 11:34:12] [Pool www] pid 2957=/data/wwwroot/cms.91.com/webroot/mobile91. php[0X00000000030C6C10] Request_by_curl ()/data/wwwroot/cms.91.com/webroot/mobile91.php:207[ 0X00000000030C6190] Request_by_curl ()/data/wwwroot/cms.91.com/webroot/mobile91.php:189[19-Sep-2014 11:34:47] [pool www] pid 2968=/data/wwwroot/cms.91.com/webroot/mobile91. php[0x000000000300b840] Request_by_curl ()/data/wwwroot/cms.91.com/webroot/mobile91.php:206[ 0X000000000300ADC0] Request_by_curl ()/data/wwwroot/cms.91.com/webroot/mobile91.php:189
PHP Open Slow Log