jibu

Member
Dec 14, 2008
8
2
53
I believe I tried the steps described here https://docs.cpanel.net/knowledge-b...-manage-your-php.ini-directives-with-php-fpm/ however I am unable to set up the php slow log. The main php fpm error log shows as below after I rebuilt the php conf and restarted fpm and httpd

child 23628 said into stderr: "ERROR: Unable to set php_admin_value 'request_slowlog_timeout'"
child 23628 said into stderr: "ERROR: Unable to set php_admin_value 'slowlog'"

The steps I did were
- edit the file /var/cpanel/userdata/username/domain.tld.php-fpm.yaml and add the following
php_admin_value_slowlog: { name: 'php_admin_value[slowlog]', value: '/var/log/php-fpm/slow.log' }
php_admin_value_request_slowlog_timeout: { name: 'php_admin_value[request_slowlog_timeout]', value: '10s' }

-/scripts/php_fpm_config --rebuild --domain=domain.tld

-restarted fpm and httpd

I tried to change the slow log file location to user home logs folder as well, still, the error remained the same.
 

jibu

Member
Dec 14, 2008
8
2
53
I had to undo it, so don't remember it exactly. Having said, after rebuilding the yaml and restarting php fpm and apache the first time changed the yaml to something like below, though am not sure about the exact syntax.

php_admin_value_slowlog:
name: php_admin_value[slowlog]
value: /var/log/php-fpm/slow.log
php_admin_value_request_slowlog_timeout:
name: php_admin_value[request_slowlog_timeout]
value: 10s