Crazy CPU Load (after moving from LiteSpeed to Apache)

Operating System & Version
CloudLinux 7
cPanel & WHM Version
100

natanrayz

Registered
Jun 28, 2020
4
0
1
India
cPanel Access Level
Root Administrator
Hello,
I have been running LiteSpeed enterprise from last year, and the current CPU usage is minimal (2 cores max). Today, I have switched from LiteSpeed to Apache, but CPU load gone crazy high. It's started hogging 32 cores, and none of our user have that kind of resource consumption as we are using CloudLinux to restrict resources.
I run the top command, and I found user: nobody hogging CPU resources with below commands.

/usr/sbin/httpd -k start
/opt/cpanel/ea-php74/root/usr/bin/php-cgi

I am feeling stuck with LiteSpeed, and I am unable to revert into Apache. If you have such experience, please share your knowledge.
 
Last edited by a moderator:

vacancy

Well-Known Member
Sep 20, 2012
544
214
93
Turkey
cPanel Access Level
Root Administrator
Litespeed promises a lower CPU consumption because it processes php processes in a different way by nature. Since I don't know your configuration, I can't say for sure, but there may be different reasons for this.

If you have opcache on your server, but php-fpm is not running, if it is running on single apache, opcache will not work, which will consume high cpu. Likewise, turning off php-fpm can also cause high CPU consumption. You can enable php-fpm for all domains and monitor the status. Apart from this, there may be a ddos attack coming to one of the sites. Since litespeed and php-fpm apply suexec process limit per domain, the processes of high accounts work within the limits, but if you are using a single apache, all processes are processed forever until the max connection limits, which causes unstable cpu consumption.
 
Last edited: