CyberPanel Community

CPU 100% problem

li
liufunyu #1

Hello guys, I have a problem about this picture,.
How to determine the cause of CPU 100% usage that occurs every few minutes and lasts for about 10 seconds before returning to normal?
#Ubuntu 20.04 / Cyberpanel 2.3.2 / Imunify360

12 replies
jo
josephgodwinke #2

Hello @liufunyu

  1. Clear out the php sessions issue unless you are running multiple php versions. To be sure try this:
# start here copy line bleow me
rm -f /var/lib/lsphp/session/lsphp71/* && rm -f /var/lib/lsphp/session/lsphp72/* && rm -f /var/lib/lsphp/session/lsphp73/* 
# then copy line below me
rm -f /var/lib/lsphp/session/lsphp74/* && rm -f /var/lib/lsphp/session/lsphp80/* && rm -f /var/lib/lsphp/session/lsphp81/*

  1. Check this out MariaDB / MySQL Tweaks As Default & Option

Basically run nano /etc/my.cnf use the keyboard shortcut CTRL+W to search for skip-name-resolve and comment it out. Restart mariadb systemctl restart mysqld

  1. Stop using Redis and opt for Memcached for caching and persistence key storage if you are using it

li
liufunyu #3

Excuse me , I don’t know why I don’t have “my.cnf” file.
And how to stop Redis or where to adjust it?
Could you give me some links to study, thank you very much.

jo
josephgodwinke #4

Go to https:/SERVER_URL:8090/manageservices/manageApplications and uninstall Redis

Run this in terminal to look up your mariadb config file find /etc -iname *.cnf use terminal editor to edit it. If you dont find any then run cyberpanel upgrade script

jo
josephgodwinke #6

Run chmod +x /usr/local/CyberCP/public/imunify/bin

You want to edit /etc/mysql/conf.d/mysql.cnf

li
liufunyu #7

image

You mean I have to edit /etc/mysql/conf.d/mysql.cnf ?
but it is nothing in it.

jo
josephgodwinke #10

Yes. You should probably reboot the server

li
liufunyu #11

OKOK, thank you so much !

li
liufunyu #12

I found the problem is I didn`t delete my sites on Kinsta hosting after I moved all my sites to Cyberpanel.
And Kinsta’s BOT monitor access all my sites every 2 minutes at the same time.
It cause the CPU 100% , when I delete all sites in Kinsta, that’s no CPU loading problem now! :stuck_out_tongue:

Sign in to reply