SP Networking

Jun 11, 2019

Website Crashes with Lightsail Bitnami WordPress Running Out of Disk Space

Website Crashes with Lightsail Bitnami WordPress Running Out of Disk Space

This solution applies to the Binary Log Files created by MySQL Database taking up all of the disk space.

A walk-through for dummies like me.

YOU MAY HAVE TO TAKE A SNAPSHOT AND CREATE A NEW INSTANCE WITH MORE DRIVE SPACE TO BE ABLE TO GET THIS TO WORK

 

Logon to your Lightsail dashboard.
Website:  https://lightsail.aws.amazon.com/ls/webapp/home/instances
Launch the SSH Terminal:


Check the folder sizes in the Bitnami folders:
Command:
sudo du -ch –max-depth=1 /opt/bitnami
Output:
23M/opt/bitnami/letsencrypt
190M/opt/bitnami/apache2
2.6M/opt/bitnami/sqlite
27M/opt/bitnami/bnsupport
2.8M/opt/bitnami/varnish
3.0M/opt/bitnami/stats
112K/opt/bitnami/var
116K/opt/bitnami/scripts
114M/opt/bitnami/common
1.2M/opt/bitnami/licenses
52K/opt/bitnami/config
79M/opt/bitnami/php
3.5G/opt/bitnami/apps
72G/opt/bitnami/mysql
8.0K/opt/bitnami/img
76G/opt/bitnami
76Gtotal
bitnami@ip-172-26-9-161:~$

Verify that the mysql folder is the one taking up all of the space(see red text above, the mysql folder is 75GB).
Logon to mysql to delete log files:
Command: mysql -u root -p
Enter password (password may be obtained with this command: sudo cat /home/bitnami/bitnami_application_password
Command: show binary logs;
Command: purge binary logs to ‘binlog.000008’; (use last binlog number)
Command: sudo /opt/bitnami/ctlscript.sh stop mysql
Edit the mysql config file
Command: nano /opt/bitnami/mysql/bitnami/my.cnf (if you don’t have nano installed to edit files use this command: sudo apt-get install nano
Add disable_log_bin in the [mysqld] block of lines:
[mysqld]
disable_log_bin
(save and exit) Ctrl-X, Y, Enter twice
Restart mysql
Command: sudo /opt/bitnami/ctlscript.sh start mysql
Remove the last binlog file, note you have to use the last one that appears in the table of the first step:
Command: # rm /opt/bitnami/mysql/binlog.000008

DONE

sudo du -ch --max-depth=1 /opt/bitnami
  •    //
  • Comments Off on Website Crashes with Lightsail Bitnami WordPress Running Out of Disk Space   //
  • webdesign