My Site has gone down for the SECOND time (and hopefully the last!)
If you are a regular reader of this blog, you will remember that a while ago, I switched over to WordPress on AWS. The transition has been smooth and it’s something I really wish I had done about a decade ago.
That said, it is still tech and it goes wrong every so often. Now that the blog is running on my server and I am in charge of it, the maintenance of the server backend also falls on me. Today, the site went off line. This is actually the second time in the past few months that it has experienced an outage. The easy fix [read: lazy] was to just reboot the instance. It came right back up and I only had about an 18 minute outage.
This time, I decided to dig a little more into it. After using putty (Solar-Putty), to get into the console, I could see that I had run out of space on the root partition.
A quick google search and it was determined that my WordPress instance was creating huge binlog files. These are binary log fines that are totally safe to delete. In fact, so safe to delete I decided to disable them completely.
sudo ls -larth /opt/bitnami/mysql/data
Note: If you are currently out of space, try deleting the binlog files using this command: sudo rm /opt/bitnami/mysql/data/binlog.00*
In order to disable the log files from being generated, you need to add the following code to your my.cnf file. This is the MySQL configuration file for the Bitname/WordPress server.
sudo nano /opt/bitnami/mysql/my.cnf
Using the editor, add the following value under the [mysqld] section.
After making changes to the MySQL configuration, you will need to restart either the server or the services.
sudo /opt/bitnami/ctlscript.sh restart
Once the system/services came back up, the website was back up as well.
Hope this helps anyone else experiencing these issues. The answers were really scattered in multiple forum answers and generally not the easiest to figure out.