• The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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