- Plesk for Linux
How to apply PHP-FPM pool settings for all domains in Plesk?
Note: the functionality to configure global PHP FPM settings on a server-wide level is not implemented in Plesk.
Take part in our product improvement and vote for this feature on Plesk UserVoice.
The top-ranked suggestions are likely to be included in the next versions of Plesk.
As a workaround apply one of the solutions below:
Warning: the significant increase of the
pm.max_children parameter can affect server performance.
Note: after applying the steps below, the PHP-FPM settings will be changed for all domains of the required Service Plan.
- Log into Plesk.
- Go to Service Plans > Hosting Plans > Service_Plan_Name > PHP Settings.
- Set the required values in the PHP-FPM settings section:
- Scroll down and press the Update & Sync button to apply changes.
Warning: The PHP-FPM settings adjusted with the script below will not be reflected in Plesk GUI.
The solution below should be applied ONLY if the Plesk upgrade to a higher version is not possible.
Log into the server via SSH.
Download the script by executing the command below:
# wget https://support.plesk.com/hc/en-us/article_attachments/360006734433/update_pm.max_children.tar.gz
Unpack the downloaded script:
# tar -xvzf update_pm.max_children.tar.gz
Execute the command below to run the script:
In the "Additional information" section example, for calculating the value of pm.max_children, based on web server available RAM... If we put the resulting number (72 in the example) into "Service Plans > Hosting Plans > service_plan_name > PHP Settings", would that example 72 value be the total server value for the web server, or would it be multiplied for every domain on the "service plan", resulting in a very high number of pm.max_children for the entire server, if there are many domains?
I have the same question as Bob B. Each additional domain that is added into a subscription seems to introduce a potential further X child processes.
Is there a way to limit / allocate total number of child processes across a subscription?
Hi @Bob B,
If 72 children is set up in the service plan settings, then such number of children will be applied to each subscription associated with the corresponding service plan
I updated article showing that received amount of children (calculated according to the RAM) has to be distributed among all websites hosted on the server
Moreover, it is required to keep in mind that most popular websites require more children while others, non-popular ones - less
Hi @Peter Shaw,
Indeed, each additional domain created under subscription inherits the same amount of children as it is specified in the subscription PHP settings
There is no possibility to limit the total number of children per subscription because this limit is set in the domain configuration file while subscription as itself is not domain - it is a Plesk object which include different features (websites, mailboxes, databases, etc)
As a solution, you can limit the number of domains, e.g. by 5, in subscription resources and set up the number of children to 10 in subscription PHP settings . This way, you will automatically limit the number of children to 50 on the subscription level (if we do not take into account further customizing children number per domain)
Another way is creating each domain on its separate subscription
Please sign in to leave a comment.