How to enable PHP Slow logging on domains with PHP-FPM handler set?

Started by mahesh, Dec 06, 2024, 07:03 AM

Previous topic - Next topic

mahesh

Question
How to enable PHP slow logging on domains with a PHP-FPM handler set?

Answer
Please vote for this feature request to be added to the Plesk functionality.

1.Log into Plesk

2.Go to Domains > example.com > PHP Settings and add the following to the Additional PHP settings section (replace example.com with actual domain name):

[php-fpm-pool-settings]
slowlog = /var/www/vhosts/example.com/logs/slow.log
request_slowlog_timeout = 1s

3.Click 'Ok'
Note: the slowlog file can be found in /var/www/vhosts/example.com/logs/ location.