Learn about Centmin Mod LEMP Stack today
Become a Member

Master Branch add pm.max_spawn_rate for PHP 8.1 only in 123.09beta01

Discussion in 'Centmin Mod Github Commits' started by eva2000, Dec 7, 2021.

  1. eva2000

    eva2000 Administrator Staff Member

    48,487
    11,113
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,303
    Local Time:
    6:34 AM
    Nginx 1.21.x
    MariaDB 10.x
    add pm.max_spawn_rate for PHP 8.1 only in 123.09beta01


    - add to /usr/local/etc/php-fpm.conf pm.max_spawn_rate php-fpm directive https://www.php.net/manual/en/migration81.new-features.php#migration81.new-features.fpm for adjustable setting for PHP 8.1 only for initial PHP 8.1 default Centmin Mod installs or for PHP upgrades when you set FPM_MAX_SPAWN_RATE variable value to greater than 32 (default value) in persistent config file /etc/centminmod/custom_config.inc prior to running centmin.sh menu option 5 PHP updates and remove pm.max_spawn_rate directive if PHP <8.1 is detected at centmin.sh menu option 5 PHP update time
    - before PHP 8.1, lower versions had pm.max_spawn_rate directive hard coded and was not end user adjustable. Centmin Mod added option to patch the hard coded value if you set FPM_MAX_SPAWN_RATE variable value to greater than 32 (default hardcoded value) in persistent config file /etc/centminmod/custom_config.inc prior to initial PHP 8.1 default Centmin Mod installs or centmin.sh menu option 5 PHP updates https://community.centminmod.com/threads/allow-adjusting-php-fpm-fpm_max_spawn_rate-in-123-09beta01.21207/
    - PHP-FPM max spawn rate limits how many additional dynamic PHP-FPM child processes can be spawned every 1 second. This means if you have set PHP-FPM process manager away from Centmin Mod default of pm = ondemand to pm = dynamic in /usr/local/etc/php-fpm.conf so you dynamically spawn PHP-FPM child processes, then it would take 30 seconds total to spawn 920 PHP-FPM child processes accounting for 2x spawn algorithm growth factor. So 1 second 8 additional PHP-FPM child processes spawned, then 2 seconds, 16 additional PHP-FPM child processes spawned, 3 seconds, 32 additional PHP-FPM child processes spawned, 4th second, 32 additional PHP-FPM child processes spawned - all the way to 30 seconds where 920 additional PHP-FPM child processes are spawned.

    Continue reading...

    Centmin Mod Github Master branch

    Master branch is where most recent commits are made as at May 24, 2015.