It may be necessary to analyse whether a particular account is reaching the maximum number of children for PHP-FPM pools when troubleshooting PHP-FPM. This is what you will discover in this article.
Procedure:
- Log in to SSH/Terminal as the root user.
- Once logged in, run the following commands to gather information about the processes:
- To view the PHP-FPM processes associated with any account:
( Note: substitute $cPusername with your account username )
ps -f -U $cPusername |grep “[p]hp-fpm” - To determine the number of PHP-FPM processes for any account:
( Note: substitute $cPusername with your account username )
ps -f -U $cPusername|grep -c “[p]hp-fpm” - To view the PHP-FPM processes for all accounts:
for user in `cat /etc/trueuserdomains|awk ‘{print $2}’`;
do printf “User $user PHP-FPM processes:\n\n”;
ps -f -U $user -u $user|grep “[p]hp-fpm”;done - To determine the number of PHP-FPM processes for all accounts:
for user in `cat /etc/trueuserdomains|awk ‘{print $2}’`;
do printf “User $user PHP-FPM processes:\n\n”;
ps -f -U $user -u $user|grep -c “[p]hp-fpm”;done
- To view the PHP-FPM processes associated with any account:
That is it! Hope you liked our article. If you run into any difficulty, feel free to contact our technical team at any problematic instant.