Search code examples
phpfastcgicloudcontrol

Cloudcontrol - overriding PHP-FPM settings, server reached pm.max_children


I am quite often receiving 'WARNING: [pool www] server reached pm.max_children setting (1), consider raising it' in my error logs for my containers on Cloudcontrol, and I am therefore looking for a way to raise this setting.

I have managed to adjust the php.ini and Apache config settings using the buildpack for PHP provided by Cloudcontrol in a GitHub repo. However, no luck for the PHP-FPM settings (any changes made in the provided php-fpm.ini are ignored).

I have tried...

  • to make changes in the existing php-fpm.ini file, located in the conf/ folder
  • creating my own php-fpm.ini, placing it in the php/conf/ folder
  • creating my own php-fpm.conf, placing it in the php/conf/ folder, and in the conf/ folder

I am defining the variables as pm = static, and max_children = 3 for the [www] pool and have tried to both include the default variables in my files, as well as just including the variables that I wish to override.

Am I overlooking something, or am I doing this wrong? Is there any better way to deal with this?

Thanks in advance!


Solution

  • We added support for overriding the default php-fpm configuration by creating a php-fpm.ini file under the .buildpack/php-fpm/conf/ directory of your project.

    Make sure you have a look at the default configuration at https://github.com/cloudControl/buildpack-php/blob/master/conf/php-fpm.ini. For info check the buildpack-php documentation.