Configure PHP-FPM processes
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/apps/APPNAME/conf/pfp-fpm/pool.conf
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