PHP FPM Tweaks

File location

/var/cpanel/userdata/$user/$domain.php-fpm.yaml

Suggested values

request_slowlog_timeout: { name: 'request_slowlog_timeout', value: 60 }
slowlog: { name: 'slowlog', value: "[% homedir %]/logs/[% scrubbed_domain %].php.slow.log" }
request_terminate_timeout: { name: "request_terminate_timeout", value: 120 }

What these values do

request_slowlog_timeout: Controls the time in seconds before a stack trace of the process is generated. This can be used to investigate long-running tasks.
slowlog: The log for the above stack traces.
request_terminate_timeout: The time before the request is stopped, the default is unlimited and can cause issues with pool exhaustion. I recommend 120 seconds however this can be increased or decreased depending on the site requirements.
pm_max_children: The pool size. The default of 5 is fine for small websites and servers. Sites with long-running tasks or more traffic should have this value increased to avoid pool exhaustion. I recommend avoiding more than 2x the CPU core count, such as on an 8 core machine you would set at most 15.

Last, Run to apply changes

/usr/local/cpanel/scripts/php_fpm_config --rebuild

Further Reading

https://documentation.cpanel.net/display/78Docs/Configuration+Values+of+PHP-FPM