PHP-FPM number of processes per user

Started by kandalf, June 17, 2024, 03:41:59 PM

Previous topic - Next topic

kandalf

In Manage WebServers Configuration we have PHP-FPM default template config where we can select the number of processes each user, however I don't find any place where I can set a specific number of processes for a specific user.

Where can I select for example the processes-50 for a specific user without apply it to all other users?

overseer

if you have .user.ini per-user custom .ini file enabled in that PHP version's php.ini, set these parameters under /home/user/public_html/.user.ini:
pm.max_children: – 100 Request.
pm.start_servers: – 20 value.
pm.min_spare_servers: -10 value
pm.max_spare_servers: -50 value

vnet

#2
Quote from: kandalf on June 17, 2024, 03:41:59 PM
In Manage WebServers Configuration we have PHP-FPM default template config where we can select the number of processes each user, however I don't find any place where I can set a specific number of processes for a specific user.

Where can I select for example the processes-50 for a specific user without apply it to all other users?

Open file user config /usr/local/cwp/php71/php-fpm.d/exampleuser.conf
pm = dynamic
pm.max_children = 50
pm.start_servers = 5
pm.min_spare_servers = 5
pm.max_spare_servers = 35


After making the changes, save the file and exit the text editor. In nano, you can do this by pressing CTRL + O to write the changes and CTRL + X to exit

Restart PHP-FPM Service:
sudo systemctl restart php-fpm


Replace as needed to suit your requirements.
Our company offers professional Dịch vụ dịch tiếng anh and dịch vụ dịch tiếng trung. We handle business documents, technical manuals, and website content with accuracy and cultural relevance. Our native speakers ensure precise translations, catering to various industries. Committed to quality and timely delivery, we help you communicate effectively in both English and Chinese.