Website crashes frequently on Lighsail

Keywords: WordPress - AWS - Technical issue - Other
Description:
Hey there,

I have a very high configuration light sail instance running on my AWS account. Here’s the configuration: 4 GB Ram and 2 vCPUs. This is an extremely high-end configuration for client’s use case of a small e-commerce platform.

As the title mentions, even after this config, my website keeps crashing. On further investigation, I found out that my disk is full and following a few other articles on this community it was clear that it was my /data folder.

I ran the following commands on the server:

cd /opt/bitnami/mysql
sudo du -h . -d 1 | sort -h

4.0K./run
4.0K./tmp
12K./var
16K./scripts
24K./support-files
28K./bitnami
396K./include
8.4M./share
156M./bin
173M./lib
73G.
73G./data

sudo du -h /opt/bitnami/mysql/data -d 1 | sort -h
32K/opt/bitnami/mysql/data/mysql
84K/opt/bitnami/mysql/data/sys
100K/opt/bitnami/mysql/data/#innodb_temp
1.4M/opt/bitnami/mysql/data/performance_schema
119M/opt/bitnami/mysql/data/bitnami_wordpress
73G/opt/bitnami/mysql/data

I am even unable to run the bnsupport-tool on the server due to no space as well. I tried removing the unnecessary plugins and uploads using SFTP on Filezilla as well.

I need to resolve this issue once and for all as there is no reason that my data directory should have 73 gigs in it.

Hoping to solve this issue now.

Can anyone reply to this? It’s really urgent! Thanks. @Ibone

Hi @parth,

Binary logging is enabled by default in MySQL. It generates several logs with all the actions that are performed by the database to be able to recover it in case something goes wrong. However, if any of the plugins you have are using the database intensively, it will generate big logs that will use all the disk space of your instance. You can disable this functionality by checking this guide in our documentation

https://docs.bitnami.com/aws/apps/wordpress/troubleshooting/disable-binary-logging-mysql/

Happy to help!


Was my answer helpful? Click on :heart:

1 Like

Thanks to @jota

I was able to solve this issue. Appreciate your help here.

Testing the site for a couple of days, I observed that my /opt/bitnami/mysql/data is increasing its size at an alarming rate and it’s inevitable that all my storage will be full in a few days time. I am uncertain what’s filling up my storage, especially after setting the binlogging set to delete files that are more than 4 days old. Currently, it’s at 36 gigs which were around 8 a couple of days back.

I need to identify what’s causing this issue at the earliest. I was able to create a support ticket this time around, thanks to the space that I have on my server now. Here’s the support code: cf41098a-26b5-c055-f5e6-d70f82649a9a.

Thanks for any help in advance.

Hi @parth,

The binlog files is the reason why MySQL is using that amount of data. As I mentioned in my previous message, it seems there is a plugin that is intensively using your database and it generates several binlog files

mysql/data:
total 34942716
drwxr-x---  7 mysql root        4096 Nov 25 07:14 .
drwxr-xr-x 13 root  root        4096 Nov 23 12:35 ..
-rw-r-----  1 mysql root          56 Feb 19  2020 auto.cnf
-rw-r-----  1 mysql mysql    1507300 Nov 22 14:03 binlog.000130
-rw-r-----  1 mysql mysql  449240197 Nov 22 17:27 binlog.000131
-rw-r-----  1 mysql mysql 1073764514 Nov 23 10:04 binlog.000132
-rw-r-----  1 mysql mysql  418010047 Nov 23 12:33 binlog.000133
-rw-r-----  1 mysql mysql     215316 Nov 23 12:40 binlog.000134
-rw-r-----  1 mysql mysql 1073859198 Nov 23 15:33 binlog.000135
-rw-r-----  1 mysql mysql 1074028515 Nov 23 17:38 binlog.000136
-rw-r-----  1 mysql mysql 1074080280 Nov 23 19:59 binlog.000137
-rw-r-----  1 mysql mysql 1073877971 Nov 23 22:28 binlog.000138

If you want to keep those files for some days, you will need to increase the disk space in the instance to not to run into space issues. If not, you can disable the binlogs completely.

Thanks for the reply @jota.

Is there a way to identify which plugin is creating these binlogs? Other than disabling the plugins?

Hi @parth,

I don’t know if you can obtain useful information from the binlog files themselves

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

or using this query

https://stackoverflow.com/questions/23701450/find-recent-object-changes-in-sql-server-database

But I suggest you ask in the official forums of WordPress to know if the application has a debug mode that shows all the changes it’s performing in the database.

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