• The APS Catalog has been deprecated and removed from all Plesk Obsidian versions.
    Applications already installed from the APS Catalog will continue working. However, Plesk will no longer provide support for APS applications.
  • Please be aware: with the Plesk Obsidian 18.0.78 release, the support for the ngx_pagespeed.so module will be deprecated and removed from the sw-nginx package.

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