SOLVED CPANEL-37047 - How to disable PHP-FPM for cpanel

tui

Well-Known Member
Jun 15, 2007
101
9
68
Mexico
cPanel Access Level
Root Administrator
It is possible to disable PHP-FPM for cpanel processes??

LFD is sending me alerts about a user that is using excesive resources, however the message is generic, it only shows me " php-fpm: pool userdomain_com " so i dont know what is the exact process so i can investigate it.

I disabled php-fpm for that domain and i change suphp for the php handler so i can see whats going on (suphp shows the exact process) however, the process that is triggering this alerts seems to be from some cpanel process as the alerts and the process manager still showing "php-fpm pool userdomain_com" even if i disabled php-fpm for that domain.

Thats why i need to disable php-fpm for cpanel, how can i do that? or how can i see the exact process that is triggering the alerts?
 

vacancy

Well-Known Member
Sep 20, 2012
459
160
93
Turkey
cPanel Access Level
Root Administrator
Note that cpanel / whm operations are processed via php-fpm.

To disable this, close and save Whm> Service manager> PHP-FPM service for cPanel Daemons service.

If these processes are excessive, there may be a brute force attack on the cpanel / whm ports.
 
  • Like
Reactions: cPRex

tui

Well-Known Member
Jun 15, 2007
101
9
68
Mexico
cPanel Access Level
Root Administrator
Thanks for your reply all of you, i disabled php-fpm service for cpanel daemons service and i will keep an eye on the server to see what is going on :)
 
  • Like
Reactions: cPRex

cPAdminsMichael

Well-Known Member
Dec 19, 2016
167
59
103
Denmark
cPanel Access Level
Root Administrator
Hi!
In my opinion it's a bad idea to disable PHP-FPM - unless you use LSAPI - as it in my experience just works better.
A better option would be to add the specific processes/scripts to your csf.pignore file
 
  • Like
Reactions: cPRex

tui

Well-Known Member
Jun 15, 2007
101
9
68
Mexico
cPanel Access Level
Root Administrator
Hi!
In my opinion it's a bad idea to disable PHP-FPM - unless you use LSAPI - as it in my experience just works better.
A better option would be to add the specific processes/scripts to your csf.pignore file
Yes, it just works better but there is no way to know or add a script/proceesss to csf.pignore because PHP-FPM runs for every proccess/script as "php-fpm pool userdomain_tld", so there is no way to use csf.pignore at least you add "php-fpm pool userdomain_tld" to csf.pignore but this disable all the alerts and you dont want this, as a hosting provider we need to know the exact process/script that is triggering the alerts to identify problems, malicious scripts, abusive scripts, etc.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
6,092
779
313
cPanel Access Level
Root Administrator
@tui - I've had this disabled on my personal server for a while for testing, and regular updates are running and not reactivating that service. Can you try disabling the service through WHM >> Service Manager and then running "/scripts/upcp --force" to see if that causes it to become active?
 

tui

Well-Known Member
Jun 15, 2007
101
9
68
Mexico
cPanel Access Level
Root Administrator
@tui - I've had this disabled on my personal server for a while for testing, and regular updates are running and not reactivating that service. Can you try disabling the service through WHM >> Service Manager and then running "/scripts/upcp --force" to see if that causes it to become active?
It was disabled until yesterday, so its not exactly daily updates, it seems that something is enabling it after some time, i im pointing to the daily updates because its the only thing that runs on my server, also nobody else has access to it, only me, what could it be and why is this happening?
 

tui

Well-Known Member
Jun 15, 2007
101
9
68
Mexico
cPanel Access Level
Root Administrator
We've been doing some additional testing on our end and we have found similar issues, although we haven't been able to isolate the problem just yet. If I find out any more details on my end I'll be sure to post here.
Hello, good to hear that, I thought it was just that happened on my server, so i will wait for updates :)
 
  • Like
Reactions: cPRex

ribeiroeder

Registered
Jun 11, 2021
2
0
1
Brazil
cPanel Access Level
Root Administrator
To collaborate with investigations into the problem:

- I'm also having to leave PHP-FPM turned off otherwise my clients find it very slow when using webmail.
- With it turned off I get great webmail performance (I use litespeed)
- I noticed that Wordpress Toolkit doesn't work with PHP-FPM turned off, it shows the error "Unable to parse received authentication token. Please contact your server administrator".
- I also noticed that the PHP-FPM service is turned on automatically and randomly after a few days, I believe that as mentioned above, it must be related to Wordpress Toolkit.
- As the webmail service is much more important to me than the Wordpress Toolkit, I decided to uninstall it, and since then, the PHP-FPM service hasn't started automatically anymore.

thanks