Learn about Centmin Mod LEMP Stack today
Become a Member

PHP-FPM PHP-FPM.conf Setup

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by Jimmy, Feb 5, 2017.

  1. Jimmy

    Jimmy Well-Known Member

    1,778
    388
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +987
    Local Time:
    3:36 AM
    Are the php-fpm.conf file populated based on the server centmin mod is installed on? Or are the values in the php-fpm.conf file just default values?

    Also, pm.min_spare_servers I read online should be the number of CPU cores on your server. If this is correct, should I consider an Intel CPU with 4 cores and 8 threads = 8 cores (for this setting).

    I also found the recommendations below, would you consider them good recommendations?


     
  2. eva2000

    eva2000 Administrator Staff Member

    53,142
    12,108
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,643
    Local Time:
    5:36 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    php-fpm.conf defaults don't need much tuning as it uses ondemand pm so number of cpu cores has no bearing on pther pm server values as ondemand pm only looks to pm.max_children and pm.max_requests and ignores other pm server values. Though pm.max_children setting needs to factor number of cpu threads.

    Centmin Mod is provide as is, so short of scripted related bugs or issues, any further optimisation to the web stack components - nginx, php-fpm, mariadb mysql, csf firewall etc or web app specific configurations are left to the Centmin Mod user to deal with. So I do not provide any free support for such.

    You'll need to tune your PHP-FPM settings with php-fpm main pool config file at /usr/local/etc/php-fpm.conf (overview of config files) and this is left up to end user to do but here's a thread for starters to enable php status page output outlined at
    Should give you further insights for changing php-fpm.conf to suit your specific needs.
     
  3. Jimmy

    Jimmy Well-Known Member

    1,778
    388
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +987
    Local Time:
    3:36 AM
    That's good to know about ondemand. I saw some people raising some of the settings really high in another thread and I thought that I maybe needed to adjust mine, so I was looking for more of an explanation / information on those settings.

    I'll check out the links you provided.

    Thanks!
     
    Last edited: Feb 5, 2017