Welcome to Centmin Mod Community
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 Premium Member Premium Member

    1,165
    256
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +626
    Local Time:
    8:07 AM
    1.13.x
    MariaDB 10.1.x
    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

    30,961
    6,918
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,420
    Local Time:
    11:07 PM
    Nginx 1.13.x
    MariaDB 5.5
    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.
     
    • Like Like x 1
    • Informative Informative x 1
  3. Jimmy

    Jimmy Premium Member Premium Member

    1,165
    256
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +626
    Local Time:
    8:07 AM
    1.13.x
    MariaDB 10.1.x
    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