You can improve the PHP-FPM pool performance by tweaking YAML file settings. Find and open your website’s PHP-FPM YAML file with PuTTY in SSH or WinSCP.

nano /var/cpanel/userdata/username/yourdomain.tld.php-fpm.yaml
(username is your cPanel username / yourdomain to be replaced with actual name)

Remove any existing YAML file contents and replace with:

---
_is_present: 1
pm: static
pm_start_servers: 20
pm_max_children: 20
pm_max_requests: 100
php_admin_value_disable_functions : passthru,system
php_flag[display_errors]: off
php_flag[display_startup_errors]: off

then rebuild the master PHP-FPM pool config files and restart the PHP-FPM processes:

/scripts/php_fpm_config --rebuild

Notes:
– You can also increase pm_max_requests, if your site has high volumes of small requests. Or, decrease pm_max_requests if you have large memory-hungry requests.
– Server’s memory usage will be relatively higher than previous so you can lower the pm_start_servers and pm_max_children values when adjusting static PHP children.