Skip to main content

PHP-FPM pm dynamic / static / ondemand option

Comments

13 comments

  • Infopro
    Check to see if the reply in this similar post is of use to you:
    0
  • unity200
    I saved the values in /var/cpanel/ApachePHPFPM/system.yaml pm: static pm.max_children: 400 and used /scripts/php_fpm_config --rebuild and it worked. Thanks.
    0
  • unity200
    Doing the exact same operation on another server, now im getting ERROR: [/opt/cpanel/ea-php72/root/etc/php-fpm.conf:47] unknown entry 'pm' It seems now somehow pm entry is not recognized despite it was recognized before. Can anyone shed some light on this?
    0
  • cPanelMichael
    Doing the exact same operation on another server, now im getting ERROR: [/opt/cpanel/ea-php72/root/etc/php-fpm.conf:47] unknown entry 'pm' It seems now somehow pm entry is not recognized despite it was recognized before. Can anyone shed some light on this?

    Hello @unity200, Can you share the step-by-step instructions of the changes you made and the specific entries you added or modified? Did you follow the guide linked on the thread below? Thank you.
    0
  • unity200
    Yes, i followed that guide and it doesnt work. When i removed those values from /var/cpanel/ApachePHPFPM/system.yaml and instead put them in /var/cpanel/ApachePHPFPM/system_pool_defaults.yaml it seems to have worked. But of course, i cant be sure. I am seeing a higher number of php-fpm processes in ps -aux | grep php*, so i think it may have worked. If someone can confirm that i would appreciate it.
    0
  • cPanelMichael
    I saved the values in /var/cpanel/ApachePHPFPM/system.yaml pm: static pm.max_children: 400

    When i removed those values from /var/cpanel/ApachePHPFPM/system.yaml and instead put them in /var/cpanel/ApachePHPFPM/system_pool_defaults.yaml it seems to have worked.

    Hello @unity200, To modify the value for a PHP-FPM configuration directive, it's important to first browse to the followingConfiguration Values of PHP-FPM - Version 80 Documentation - cPanel Documentation As seen on the document linked above, "pm" and "pm.max_children" are found under the Pool name directives section. Directives listed under the Pool name directives section are known as Pool directives. Thus, you'd customize the directive in the file path listed under the following section of the thread linked in my last response: [QUOTE]Pool Directives Defaults: /var/cpanel/ApachePHPFPM/system_pool_defaults.yaml Individual Domains: /var/cpanel/userdata/$username/$domain.tld.php-fpm.yaml
    In this case, since you're making a change to the default value, you'd add the custom value to /var/cpanel/ApachePHPFPM/system_pool_defaults.yaml. Let me know if this helps. Thank you.
    0
  • unity200
    Per your post above: - I made changes to the default value. This didnt change the amount of processes one particular site user can spawn. Despite it seems to increase the total amount of spawned processes by php-fpm. - When i changed the individual values for children for that site account in php-fpm config for that account in MultiPHP manager in WHM, that allowed more php processes for the user. So it seems changing default values after a user is created has no effect. Individual values from MultiPHP php-fpm configuration must be changed per domain if a user already exists. I think we can consider this solved. Thanks.
    0
  • cPanelMichael
    So it seems changing default values after a user is created has no effect. Individual values from MultiPHP php-fpm configuration must be changed per domain if a user already exists.

    Hello @unity200, Ensure you execute the following commands after making the change to /var/cpanel/ApachePHPFPM/system_pool_defaults.yaml: /usr/local/cpanel/scripts/php_fpm_config --rebuild /scripts/restartsrv_httpd
    Thank you.
    0
  • uk01
    Hi the discussion on this page sees to contradict others I"ve read which says put pm: static in this fike /var/cpanel/userdata/username/domain.tld.php-fpm.yaml Which is correct?
    0
  • cPRex Jurassic Moderator
    • @uk01 - the details here are 3 years old, and we've made changes to the PHP-FPM system in that time. You can always find the latest details in our documentation here:
    0
  • CharlesGLondon

    "@uk01 - the details here are 3 years old, and we've made changes to the PHP-FPM system in that time. You can always find the latest details in our documentation here:"

    Hello where is the link to see the latest details to make such changes?

    0
  • cPRex Jurassic Moderator

    CharlesGLondon - I've updated the older post so it has the link - let me know if that has what you need.

    0
  • CharlesGLondon

    Yes, I already found it from searching. Thanks.

    0

Please sign in to leave a comment.