Mysql process taking 50%+ of processing resources

Hi All,

I am new to this forum and quite amateur overall about Bitanami.

In the small company that I work for, we have a small server hosting the company’s website. This machine is an Ubuntu 16.04.6 running in AWS.

The website (a Wordpress site) went down due to lack of space in the disk. After freeing up space we stopped and restarted Bitnami services as the website was still not loading. we did that by:

opt/bitnami/ stop
/opt/bitnami/ start

After that the website was working again but incredibly slow. When printing the processes running, we see that a mysql process is taking between 40 to 70% of the processor resources.

output of ps -aux: (48.8 is the CPU usage %)

mysql     3799 48.8 39.7 1700572 393724 pts/1  Sl   15:14   0:38 /opt/bitnami/mysql/bin/mysqld.bin --defaults-file=/opt/bitnami/mysql/my.cnf --basedir=/opt/bitnami/mysql --datadir=/opt/bitnami/mysql/data -

Calling the home page of the website takes approx 15 seconds.

We have installed the Bitnami Support Tool and run the diagnosis of the system. I am not sure I am using the right way to rise a ticket but here is the ID:

Can you please help me understand what is wrong and why the website now is running so slow?

Please let me know if you require any further information.

Cheers All!

Hello @andresUnifi,

Looking into your configuration, the captured snapshot of your system has MySQL with a CPU usage of 25.8%, with it using almost 400MB of memory and with little free memory left. Could you share here the output of the command free -m when MySQL is at the maximum CPU usage levels? I would also try disabling binary logging to see if it has an impact performance.

Hi fdepaz,

Thank you very much for the help and the quick response, really appreciate that!.

As you have well pointed out, the memory usage has now gone stable to 27.2% even home is called, where it used to register the biggest usage.

This is the output of the command you asked me (it was run when I requested home page from the website):

root@ip-172-31-42-4:~# free -m
              total        used        free      shared  buff/cache   available
Mem:            968         398         124          51         445         335
Swap:           634         169         464

this is also the output from ps aux for mysql process:

mysql 3799 27.2 31.9 1738588 317244 ? Sl Feb02 408:22 /opt/bitnami/mysql/bin/mysqld.bin --defaults-file=/opt/bitnami/mysql/my.cnf --basedir=/opt/bitnami/mysql --datadir=/opt/bitnami/mysql/data -

Although the CPU usage has decreased, the website is still very slow.

Please let me know if this information gives you additional clues of what might be going wrong

Once more, thanks for the help


Hello @andresUnifi,

Although there is not a lot of free memory, I’m not sure the performance should be bad considering that it used to run well. Nevertheless, this performance drop may be caused by a multitude of factors.

I have seen that your PHP is throwing the warning server reached max_children setting (5), consider raising it, please use this guide to at least double it.

Another possible cause may be a faulty code in your /wp-includes folder, as you are getting the following warning:

PHP Warning:  "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /opt/bitnami/apps/wordpress/htdocs/wp-includes/pomo/plural-forms.php on line 210

If you want, you can try to solve this by replacing continue; with continue2; or break;.

Apart from this, I would try installing a plugin like W3 Toal Cache to improve the site performance, you can check how in our guide Optimize Wordpress.

Hi fdepaz,

Thanks again for the Info.
Yes, you are right, it is very strange that it was working just fine before the space issue.

I will look to put in place your suggestions and I’ll let you know about the outcome.


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