Sorry, still got a problem here and confusion between php.ini directives and php-fpm.conf setttings.
Consider:
Looking at file:
/opt/plesk/php/5.6/etc/php-fpm.d/mydomain.uk.conf
as generated by Plesk and unmodified by me I have these lines:
; By default use ondemand spawning (this requires php-fpm >= 5.3.9)
pm = ondemand
pm.max_children = 5
pm.process_idle_timeout = 10s
; Following pm.* options are used only when 'pm = dynamic'
pm.start_servers = 1
pm.min_spare_servers = 1
pm.max_spare_servers = 1
On a live server/site I restart php-fpm using (or use Plesk services restart, makes no difference):
sudo service plesk-php56-fpm restart
Looking at htop output after a few minutes I have up to 5 processes showing the command as:
php-fpm: pool mydomain.uk
Each of these processes consume anything between 0 and 100% of CPU, they are born and die as needed.
What I see is consistent with and what I would expect using the pm.* settings show above.
------------------------------------------------------------------------------------
I then change the file (i.e. the Plesk do not do this message way) so I have:
pm.max_children = 1
Then restart php-fpm as above.
Now after a few minutes htop shows me a single php-fpm: pool mydomain.uk process consuming up to 100% CPU.
And this is consistent and what I would expect with this pm.max_children settings.
------------------------------------------------------------------------------------
I return the file to its original state, as at top, and restart php-fpm.
Everything back to normal as it was originally.
Then go to domain PHP settings in Plesk Panel.
Add following line to PHP Additional configuration directives.
pm.max_children = 1
Click OK or Apply buttons.
In htop see php-fpm processes restart.
After a few minutes I still have the 5 php-fpm: pool mydomain.uk processes NOT the single one I expected.
Restart php-fpm as above, just in case, still no success.
Look at the mydomain.uk.conf file and find that Plesk has not changed the pm.max_children line but instead added the following line at the end of the file along with any additional configuration directives that have been entered.
php_value[pm.max_children] = 1
I.E Plesk is treating it as a php.ini directive customisation not a PHP-FPM setting!
------------------------------------------------------------------------------------
So still back with the original question.
How can I change the PHP-FPM settings for a domain without breaking the rules and editing a file Plesk tells me not to!
The only way around this I can see is to change the file:
/opt/plesk/php/5.6/etc/php-fpm.conf
adding the following line at the end:
include=/opt/plesk/php/5.6/etc/php-fpm-mydomains.d
This file won't get overwritten by domain changes through Plesk panel BUT I suspect I could sometimes lose my extra line(s) during a Plesk update.
So not a good long term solution and also something someone could trip up on.
Was hoping the much improved Plesk 12.5 would get rid of a previous php-fpm configuration muddle on an earlier version elsewhere!