nativeInstallerresourcespace

Configure PHP-FPM processes

Before running the commands shown on this page, you should load the Bitnami stack environment by executing the installdir/use_APPNAME script (Linux and MacOS) or by clicking the shortcut in the Start Menu under “Start -> Bitnami APPNAME Stack -> Application console” (Windows). On OS X VMs, the installation directory is /opt/bitnami and OS X VM users can click the “Open Terminal” button to run commands. Learn more about the Bitnami stack environment and about OS X VMs.

NOTE: The Approach A sections referred to below do not apply to Bitnami native installers. Users of Bitnami native installers should refer only to the Approach B sections.

It is possible to configure PHP-FPM processes per application. If you have a lot of applications, this may result in excessive CPU usage.

  • You can configure your application’s PHP-FPM processes to start automatically when needed. Add this option to the PHP-FPM pool configuration file:

    NOTE: Depending on your installation type, you can find the PHP-FPM pool configuration file for your application in the following locations:

    • Approach A (Bitnami installations using system packages): installdir/php/etc/php-fpm.d/www.conf
    • Approach B (Self-contained Bitnami installations): installdir/apps/APPNAME/conf/php-fpm/pool.conf
      pm=ondemand
    
  • You can also reduce the number of PHP-FPM processes per application by modifying the files below.

    • If you configured the processes to start dynamically, modify the installdir/php/etc/common-dynamic.conf as below:

        pm=dynamic
        pm.max_children=5
        pm.start_servers=2
        pm.min_spare_servers=1
        pm.max_spare_servers=3
      
    • If you configured the processes to start on demand, modify the installdir/php/etc/common-ondemand.conf as below:

        pm=ondemand
        pm.max_children=5
        pm.start_servers=2
        pm.min_spare_servers=1
        pm.max_spare_servers=3
      
Last modification July 6, 2021