There is not enough space in the RDS database storage

I just upgraded my RDS storage from 10 to 20 GB, and after a couple of days, RDS says the storage is full again.

Running this query in MySQL workbench on the same database says that the database size is 43 MB

SELECT table_schema "database_name", sum( data_length + index_length ) / 1024 / 1024 "Data Base Size in MB", sum( data_free )/ 1024 / 1024 "Free Space in MB" FROM information_schema.TABLES GROUP BY table_schema ; 

So, something happens with the logs that MySQL creates, or with backups, etc., that can fill my space on production servers.

Please, help.

+7
source share
2 answers

Its probably the mysql.slow_log table, which takes up so much space. You can delete slow logs by running the following sql:

 CALL mysql.rds_rotate_slow_log 
+5
source

There are several types of logs in mysql. Take a look at http://dev.mysql.com/doc/refman/5.1/en/server-logs.html . But I advise you to look at slow query logs. If you have a lot of slow queries, your log will grow rapidly. Also check the --log-queries-not-using-indexes option. Perhaps you are registering all your queries without indexes.

0
source

All Articles