Home  >  Article  >  Backend Development  >  How to enable slow log query in PHP

How to enable slow log query in PHP

藏色散人
藏色散人Original
2020-07-23 09:51:033502browse

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.

How to enable slow log query in 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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn