Cannot set up PHP Slow Log
Hello,
I have a server running WHM/cPanel over AlmaLinux 8.7. I've tried to setup the php slow log following the directions for a single domain in this link
https://support.cpanel.net/hc/en-us/articles/360056146394-How-to-configure-the-PHP-FPM-slow-log
But I cannot get it to work. I tried creating the log file manually to see if it would start logging but it won't.
I would greatly appreciate if someone could shed some light on my potential issue
Thanks
-
Initially, locate the PHP-FPM Configuration Files, typically situated in the /etc/php/{version}/fpm directory. The primary configuration file is commonly named php-fpm.conf, and pool configurations are stored in the pool.d directory. Subsequently, modify the PHP-FPM Configuration File to set the parameters for slow logs:
Identify the following parameters related to slow logs and customize them to suit your requirements:
- slowlog: Path to the slow log file.
- request_slowlog_timeout: The time (in seconds) after which a request is deemed slow and logged.``
slowlog = /var/log/php-slow.log
request_slowlog_timeout = 5s
```
Adjust the file path and timeout based on your preferences.After implementing these changes, restart the PHP-FPM service to apply the updated configuration.
0
Please sign in to leave a comment.
Comments
1 comment