Skip to main content

How-To Modify PHP-FPM Configuration Directives in EasyApache 4

Comments

3 comments

  • celiac101
    I seem to be stuck with how to edit the those settings. If I manually put them into the file (/opt/cpanel/ea-php72/root/etc/php-fpm.conf), it gets erased when I rebuild them (/scripts/php_fpm_config --rebuild "domain=domain.com), and they are lost: emergency_restart_interval = 60 emergency_restart_threshold = 5 process_control_timeout = 10 But the settings do seem to be working there. I have tried many ways to add these to my .yaml file so that this will not happen, but each way I have tried results in an unresponsive server--503 errors. /var/cpanel/userdata/site/domain.com.php-fpm.yaml In the config file it says to edit the settings in the WHM interface, but when I am there I see no way to do this: 57983 Any help with this would be appreciated.
    0
  • cPanelMichael
    Hello @celiac101, Thanks for sharing the additional information. The PHP-FPM Global directives are configured separately from the PHP-FPM Pool directives. To modify the value for a PHP-FPM configuration directive, it's important to first browse to the Configuration Values of PHP-FPM document: emergency_restart_threshold emergency_restart_interval To modify the values for both of these Global directives, create the /var/cpanel/ApachePHPFPM/system.yaml file and populate it with the following lines: --- emergency_restart_threshold: 10 emergency_restart_interval: 1m
    Feel free to replace "10" and "1m" with your own values. After saving the file, run the following command to apply the changes to the PHP-FPM configuration files: /scripts/php_fpm_config --rebuild
    Note: If you see an error message in this command's output, verify no Global directives exist in the following Pool directive configuration files: /var/cpanel/ApachePHPFPM/system_pool_defaults.yaml /var/cpanel/userdata/$username/$domain.tld.php-fpm.yaml Let me know if this helps. Thank you.
    0
  • cPanelMichael
    Hello @celiac101, I modified my
    0

Please sign in to leave a comment.