PHP FPM – Check if Installed and Running
This tutorial guides you on how to check whether PHP FPM is installed and running. Also, it additionally shares some information on Bluehost process limits and how to check if php-fpm is installed and running in Bluehost server.
PHP FPM – Check if Installed and Running
The following Linux command can be used to check whether php-fpm is installed and running by searching through the process list.
[~]# ps aux | grep php-fpm snepp5wg 118 0.0 0.0 6504 548 ? SN+ 13:13 0:00 grep --color php-fpm
The above command I ran in Bluehost cPanel via terminal option as shown below to check if php-fpm is installed and running.
I had hosted my website in Bluehost shared webhosting. Because I share the server processor time with other users, Bluehost limits the number of total apache php processes that you can run on the server at one time. Some users are allowed to run 20 concurrent processes, while some other users will will be able to run 25 concurrent processes.
If you attempt to run more than your plan’s allowed concurrent processes, your website may not display properly. That’s what happened to to my website hosted on Bluehost. I faced slowness and website was down and getting request time outs (RTOs).
Then I had approached Bluehost support team on the down time, they just shared the following php-fpm logs which shows monitored number of concurrent processes.
[Mon Sep 14 14:33:01 2020] uid 1273 (snepp) processes: `---> (snepp) /opt/cpanel/ea-php56/root/usr/bin/php-cgi /home/sne/public_html/sne/wp-cron.php `---> (snepp) /opt/cpanel/ea-php56/root/usr/bin/php-cgi /home/sne/public_html/sne/wp-cron.php `---> (snepp) /opt/cpanel/ea-php56/root/usr/bin/php-cgi /home/sne/public_html/sne/wp-admin/admin-ajax.php `---> (snepp) /opt/cpanel/ea-php56/root/usr/bin/php-cgi /home/sne/public_html/sne/wp-admin/admin-ajax.php `---> (snepp) /opt/cpanel/ea-php56/root/usr/bin/php-cgi /home/sne/public_html/index.php `---> (snepp) /opt/cpanel/ea-php56/root/usr/bin/php-cgi /home/sne/public_html/index.php `---> (snepp) /opt/cpanel/ea-php56/root/usr/bin/php-cgi /home/sne/public_html/index.php `---> (snepp) /opt/cpanel/ea-php56/root/usr/bin/php-cgi /home/sne/public_html/sne/wp-admin/admin-ajax.php `---> (snepp) /opt/cpanel/ea-php56/root/usr/bin/php-cgi /home/sne/public_html/sne/wp-admin/admin-ajax.php `---> (snepp) /opt/cpanel/ea-php56/root/usr/bin/php-cgi /home/sne/public_html/index.php `---> (snepp) /opt/cpanel/ea-php56/root/usr/bin/php-cgi /home/sne/public_html/index.php `---> (snepp) /opt/cpanel/ea-php56/root/usr/bin/php-cgi /home/sne/public_html/index.php `---> (snepp) /opt/cpanel/ea-php56/root/usr/bin/php-cgi /home/sne/public_html/sne/wp-admin/post.php `---> (snepp) /opt/cpanel/ea-php56/root/usr/bin/php-cgi /home/sne/public_html/index.php `---> (snepp) /opt/cpanel/ea-php56/root/usr/bin/php-cgi /home/sne/public_html/index.php `---> (snepp) /opt/cpanel/ea-php56/root/usr/bin/php-cgi /home/sne/public_html/index.php `---> (snepp) /opt/cpanel/ea-php56/root/usr/bin/php-cgi /home/sne/public_html/sne/wp-admin/edit.php `---> (snepp) /opt/cpanel/ea-php56/root/usr/bin/php-cgi /home/sne/public_html/index.php `---> (snepp) /opt/cpanel/ea-php56/root/usr/bin/php-cgi /home/sne/public_html/index.php `---> (snepp) /opt/cpanel/ea-php56/root/usr/bin/php-cgi /home/sne/public_html/index.php `---> (snepp) /opt/cpanel/ea-php56/root/usr/bin/php-cgi /home/sne/public_html/index.php `---> (snepp) /opt/cpanel/ea-php56/root/usr/bin/php-cgi /home/sne/public_html/index.php [Wed Sep 16 22:14:02 2020] uid 127345 (snepp) has more than 20 processes (danger zone) TOTAL: 22
Also they shared the following comments on the Bluehost user processes limits.
Bluehost Processes Limit : Shared Hosting
“A new process is normally created when an existing process makes an exact copy of itself in memory. The child process will have the same environment as its parent, but only the process ID number is different.
On our shared servers, the process limit set on the server is 25 processes. If the scripts are not optimized, Simultaneous process gets created before the existing process is closed this causes the process count to breach.
From the above logs, we could see that the “index.php” which is the primary file of your website is loaded which in turn is linked to different pages and links in the website which would trigger more such process.
We suggest you to get the logs checked with the help of a developer and get the scripts optimized so that the processes does not get spawned simultaneously.”
Conclusion
Basically I just wanted to see if there is any way that I can monitor process limits in the shared server on Bluehost. But I could check only if php-fpm is installed and running on Bluehost. I don’t have privileges or root access (since it’s shared server), so that I can setup something to monitor apache processes.
Now, I am working on setting up php-fpm in my development environment to check if I can measure and monitor the number of apache php scripts processes triggered simultaneously. And optimize my website if I could 🙂 using apache and php-fpm performance optimization.
Hope the sneppet on “PHP FPM – Check if Installed and Running” shares some information to the Bluehost users as well :-).
Also See:
- With UAC please avoid installing XAMPP to C:\Program Files warning ?
- PHP-FastCGI on Windows in XAMPP for PHP Performance
- Create components inside a specific folder with Angular 9 CLI ?
- Best way to delete components in Angular 9 with CLI
- Get index of ngFor element using index as value in attribute
- Set default value in the dropdown list in Angular 9
- Dynamic and conditional CSS classes with ngClass : Angular
- Best way to delete components in Angular 9 with CLI ?
- Quickly create div classes in Visual Studio Code editor
- Global Angular CLI version is greater than your local version
- Create custom events and fire in Angular 9 with EventEmitter – Example
- ERROR in multi /bootstrap.min.css ./src/styles.css in Angular 9
- Bind selected element from drop down to an object in Angular 9
- Angular 9 Error : ‘app-header’ is not a known element
- How to stop generation of .spec.ts test files using Angular CLI ?