Home >Backend Development >PHP Problem >How to enable slow log query in PHP
How to enable slow query in PHP: first find the "php-fpm" file; then remove the semicolon in front of "request_slowlog_timeout" and set the time; then remove the semicolon in front of slowlog and set the log path; finally Just restart PHP.
PHP enables slow log query
Recommended: "PHP Tutorial"
1. Find the php-fpm file
2. Remove the semicolon in front of request_slowlog_timeout and set the time. For example: request_slowlog_timeout=5 means more than 5 seconds
3. Remove the semicolon in front of slowlog and set the log path. For example, slowlog=/usr/local/php71/log
4, restart PHP
The above is the detailed content of How to enable slow log query in PHP. For more information, please follow other related articles on the PHP Chinese website!