CPU usage problem by MySQL In a WordPress site
I have a wordpress site on digital ocean with following configuration
ubuntu 18 OS, php7.2-fpm, mariadb, wordpress
they are hosted on a 80$ droplet, A 4 core dedicated cpu droplet still my site goes DOWN, on checking graphs everything is normal i.e CPU usage is 20%, Disk at 50%, Memory at 33% but still site gives a 502 error during high traffic.
when i SSH into droplet and use Ubuntu’s command
htop i see a single
mysql pid using upto 200% CPU, is this a reporting problem ?
why all 4 core of my CPU is around 20-40% but a single
pidof mysql is using 200% CPU internally and crashing the site and how can i fix it ?