• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

Modifying php-fpm settings for all domains and new ones?

Some sites reach maximum children

so I need to change

pm.max_children = 5

for all new domains on a server

How can this be done?

I know i can change it manually on each new domain, is there some kind of template to modify?
 
Use "sed", if you want to change such things... and to avoid Plesk re-changing the modified conf - files, please rename them to something I suggest as well:

Code:
sed -i 's/pm.max_children = X/pm.max_children = XX/' /etc/php5/fpm/pool.d/*.conf
sed -i 's/pm.start_servers = X/pm.start_servers = XX/' /etc/php5/fpm/pool.d/*.conf
sed -i 's/pm.min_spare_servers = X/pm.min_spare_servers = XX/' /etc/php5/fpm/pool.d/*.conf
sed -i 's/pm.max_spare_servers = X/pm.max_spare_servers = XX/' /etc/php5/fpm/pool.d/*.conf
sed -i 's/;pm.max_requests = X/pm.max_requests = 1024/' /etc/php5/fpm/pool.d/*.conf

( optional - if set... if not set yet, you might think of using it, to tune your several php-fpm - configs! )
sed -i 's/;rlimit_files = X/rlimit_files = 102400/' /etc/php5/fpm/pool.d/*.conf

Please replace the "X" with YOUR actual and desired definitions!

To rename the config - files, please use:

rename s/'^'/'YOUR_PREFIX'/ /etc/php5/fpm/pool.d/*
 
Back
Top