Mysql.bin consuming burst cpu utilization

Keywords: WordPress - AWS - Technical issue - Services (Apache, MariaDB, MySQL…)

bnsupport ID: 4e46a3f3-8e74-7dbf-572e-ce9b2093bd0b

bndiagnostic output:

? Apache: Found possible issues
? Connectivity: Found possible issues
https://docs.bitnami.com/general/apps/wordpress/administration/use-pagespeed/#disable-pagespeed
https://docs.bitnami.com/general/apps/wordpress/troubleshooting/debug-errors-apache/
https://docs.bitnami.com/general/faq/administration/use-firewall/

bndiagnostic failure reason: The documentation did not make any significant change

Description:
Hi, our Bitnami WordPress installation, based on Amazon Lightsail is consuming huge volume of CPU. We have seen that /opt/bitnami/mysql/bin/mysqld.bin seems to be the most critical resource. Can you help us?
Thanks in advance

    0 [xenwatch]
  272 /usr/sbin/chronyd -F -1
  744 pr -TW237
  788 sort -b -k1,1n
 1268 ps -e -orss=,args=
 1672 /bin/sh /opt/bitnami/mysql/bin/mysqld_safe --defaults-file=/opt/bitnami/mysql/my.cnf --mysqld=mysqld.bin --socket=/opt/bitnami/mysql/tmp/mysql.sock --datadir=/opt/bitnami/mysql/data --log-error=/opt/bitnami/mysql/data/mysqld.log --
 2088 /usr/sbin/atd -f
 2204 /usr/sbin/chronyd -F -1
 2228 (sd-pam)
 2728 /usr/sbin/cron -f
 3560 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
 4820 sshd: bitnami@pts/0
 5052 /lib/systemd/systemd-udevd
 5616 /sbin/dhclient -6 -v -pf /run/dhclient6.eth0.pid -lf /var/lib/dhcp/dhclient6.eth0.leases -I -df /var/lib/dhcp/dhclient.eth0.leases -nw eth0
 5852 /sbin/dhclient -4 -v -i -pf /run/dhclient.eth0.pid -lf /var/lib/dhcp/dhclient.eth0.leases -I -df /var/lib/dhcp/dhclient6.eth0.leases eth0
 5884 /usr/sbin/rsyslogd -n -iNONE
 6388 /usr/sbin/haveged --Foreground --verbose=1 -w 1024
 6692 /usr/sbin/sshd -D
 7440 /lib/systemd/systemd-logind
 7972 sshd: bitnami [priv]
 8184 -bash
 8276 /lib/systemd/systemd --user
 8628 /lib/systemd/systemd-journald
 8752 /opt/bitnami/apache2/bin/httpd.bin -f /opt/bitnami/apache2/conf/httpd.conf -DDISABLE_BANNER
 9828 /sbin/init
10368 php-fpm: pool wordpress
10372 php-fpm: pool wordpress
10372 php-fpm: pool wordpress
10372 php-fpm: pool wordpress
10372 php-fpm: pool wordpress
10428 php-fpm: pool wordpress
12588 php-fpm: master process (/opt/bitnami/php/etc/php-fpm.conf)
15300 /opt/bitnami/apache2/bin/httpd.bin -f /opt/bitnami/apache2/conf/httpd.conf -DDISABLE_BANNER
15604 /usr/bin/gonit
15620 /usr/bin/freshclam -d --foreground=true
17092 /usr/bin/python3 /usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signal
20200 /opt/bitnami/apache2/bin/httpd.bin -f /opt/bitnami/apache2/conf/httpd.conf -DDISABLE_BANNER
21556 /opt/bitnami/apache2/bin/httpd.bin -f /opt/bitnami/apache2/conf/httpd.conf -DDISABLE_BANNER
21648 /opt/bitnami/apache2/bin/httpd.bin -f /opt/bitnami/apache2/conf/httpd.conf -DDISABLE_BANNER
21820 /opt/bitnami/apache2/bin/httpd.bin -f /opt/bitnami/apache2/conf/httpd.conf -DDISABLE_BANNER
24536 /opt/bitnami/apache2/bin/httpd.bin -f /opt/bitnami/apache2/conf/httpd.conf -DDISABLE_BANNER
24768 /opt/bitnami/apache2/bin/httpd.bin -f /opt/bitnami/apache2/conf/httpd.conf -DDISABLE_BANNER
28040 /opt/bitnami/apache2/bin/httpd.bin -f /opt/bitnami/apache2/conf/httpd.conf -DDISABLE_BANNER
29080 /opt/bitnami/apache2/bin/httpd.bin -f /opt/bitnami/apache2/conf/httpd.conf -DDISABLE_BANNER
31316 /opt/bitnami/apache2/bin/httpd.bin -f /opt/bitnami/apache2/conf/httpd.conf -DDISABLE_BANNER
31612 /opt/bitnami/apache2/bin/httpd.bin -f /opt/bitnami/apache2/conf/httpd.conf -DDISABLE_BANNER
41988 /opt/bitnami/apache2/bin/httpd.bin -f /opt/bitnami/apache2/conf/httpd.conf -DDISABLE_BANNER
48864 /opt/bitnami/apache2/bin/httpd.bin -f /opt/bitnami/apache2/conf/httpd.conf -DDISABLE_BANNER
82240 /opt/bitnami/apache2/bin/httpd.bin -f /opt/bitnami/apache2/conf/httpd.conf -DDISABLE_BANNER
104176 /opt/bitnami/apache2/bin/httpd.bin -f /opt/bitnami/apache2/conf/httpd.conf -DDISABLE_BANNER
104276 /opt/bitnami/apache2/bin/httpd.bin -f /opt/bitnami/apache2/conf/httpd.conf -DDISABLE_BANNER
125292 php-fpm: pool www
131524 php-fpm: pool www
145928 php-fpm: pool www
641492 /opt/bitnami/mysql/bin/mysqld.bin --defaults-file=/opt/bitnami/mysql/my.cnf --basedir=/opt/bitnami/mysql --datadir=/opt/bitnami/mysql/data --plugin-dir=/opt/bitnami/mysql/lib/plugin --user=mysql --lower-case-table-names

Hi @francesco.trevisani,

Thanks for using Bitnami. I checked your bndiagnostic bundle and MySQL is also the process consuming the most CPU in your server, which causes your credits consumption.

-----------------------------------                                                                                                                                                                                                                           Check CPU usage for current processes
-----------------------------------
Running: ps -e -o pcpu,nice,state,cputime,args --sort -pcpu | awk '{print $1,$2,$3,$4,$5}'
In: /opt/bitnami

Output:

%CPU NI S TIME COMMAND
38.9 0 S 00:23:43 /opt/bitnami/mysql/bin/mysqld.bin

I also see you have many plugins installed on your website, and some very big MySQL binlog files, which usually means that your website (and probably the plugins/theme you are using) are intensively using the database to store data, causing the high CPU consumption.

mysql/data:
total 22453440
drwxr-x---  7 mysql root        4096 Nov 18 16:44 .
drwxr-xr-x 11 root  root        4096 Jun  8 15:28 ..
-rw-r-----  1 mysql root          56 Feb 15  2021 auto.cnf
-rw-r-----  1 mysql mysql 1073745464 Nov 14 11:22 binlog.000085
-rw-r-----  1 mysql mysql 1073846812 Nov 16 16:55 binlog.000086
-rw-r-----  1 mysql mysql  559668246 Nov 16 18:23 binlog.000087
-rw-r-----  1 mysql mysql 1073755376 Nov 16 20:03 binlog.000088
-rw-r-----  1 mysql mysql  367401822 Nov 16 20:47 binlog.000089
-rw-r-----  1 mysql mysql  366041680 Nov 16 21:41 binlog.000090
-rw-r-----  1 mysql mysql 1073805807 Nov 17 00:18 binlog.000091
-rw-r-----  1 mysql mysql 1073834286 Nov 17 03:38 binlog.000092
-rw-r-----  1 mysql mysql 1073814473 Nov 17 06:35 binlog.000093
-rw-r-----  1 mysql mysql  214147167 Nov 17 07:07 binlog.000094
-rw-r-----  1 mysql mysql 1073897261 Nov 17 09:38 binlog.000095
-rw-r-----  1 mysql mysql 1073825941 Nov 17 12:24 binlog.000096
-rw-r-----  1 mysql mysql 1073835142 Nov 17 14:47 binlog.000097
-rw-r-----  1 mysql mysql 1073796581 Nov 17 17:27 binlog.000098
-rw-r-----  1 mysql mysql 1073798100 Nov 17 19:10 binlog.000099
-rw-r-----  1 mysql mysql 1073783220 Nov 17 21:18 binlog.000100
-rw-r-----  1 mysql mysql 1073813166 Nov 18 00:05 binlog.000101
-rw-r-----  1 mysql mysql 1073857573 Nov 18 03:18 binlog.000102
-rw-r-----  1 mysql mysql 1073881881 Nov 18 06:38 binlog.000103
-rw-r-----  1 mysql mysql 1073813643 Nov 18 08:42 binlog.000104
-rw-r-----  1 mysql mysql 1073831076 Nov 18 11:11 binlog.000105
-rw-r-----  1 mysql mysql 1073836173 Nov 18 13:50 binlog.000106
-rw-r-----  1 mysql mysql 1073876822 Nov 18 15:58 binlog.000107
-rw-r-----  1 mysql mysql  451680884 Nov 18 16:43 binlog.000108
-rw-r-----  1 mysql mysql  435217100 Nov 18 17:42 binlog.000109

We recommend you to use the mysqlbinlog tool to inspect the events generating those big files and finding the plugins that may be causing this

https://dev.mysql.com/doc/refman/8.0/en/mysqlbinlog.html

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.