AWS RDS Storage increasing unexpectedly

2

I’m using RDS PostgreSQL with the free tier configuration (t2.micro instance, 20 GB of general purpose database storage (SSD) and 20 GB of backups storage).

I’ve created a database with a few tables and the current usage is below 200 MB.

The issue is that the storage has been increasing day by day at a rate of 1 GB per day since I’ve created the database. As a workaround I’ve tried to stop this behavior by decreasing the backup retention period from 7 to 0 days. From yesterday on, no more backups were stored. However, the storage kept on growing at almost the same rate.

I have no clue what's going on and I don't know what to do to stop the consumption and avoid exceeding the free tier storage.

Apart from that, I also don't know which storage is the one that has been increasing (data or backup storage) because the AWS platform only says that the increase is in the RDS Storage (it doesn't distinguish between both types of storages). As I’m not storing a lot of data in the database I suspect the problem is in the backups and snapshots storage and not in the data storage itself.

Thanks in advance!

  • I also just recently created a RDS MySql database. I haven't touched it besides creating it. and within a week it has almost reached the monthly free tier limit of 20gb of storage use.

    I have 2 snapshots related to the DB which cannot be deleted for some reason but that's it.

    Under monitoring it says the DB instance it self only takes up 110mb out of 200gb.

    Only other snapshots are the public ones in which there are more than 50.. however these cannot be removed as they are owned by other users. I think it would be insane if they counted into the calculation of your private RDS space.

2 Answers
0

Hi There

Amazon RDS DB instance storage is used by the following:

  • Temporary tables or files that are created by PostgreSQL transactions
  • Data files
  • Write ahead logs (WAL logs)
  • Replication slots
  • DB logs (error files) that are retained for too long
  • Other DB or Linux files that support the consistent state of the RDS DB instance

Check this article for some troubleshooting steps for figuring out where the increase is coming from.

https://aws.amazon.com/premiumsupport/knowledge-center/diskfull-error-rds-postgresql/

profile pictureAWS
EXPERT
Matt-B
answered 2 years ago
0

In my case, a PostgreSQL instance is currently increasing at the rate of about 1 GB every hour! For weeks it was ok, then I scaled up from 5 GB to 16 GB, it got full again in 24 hours, then I scaled up from 16 GB to 32 GB, and the storage space is filling up again! It seems to coincide with a DMS task that I set up and ran yesterday. To bve confirmed in CloudWatch. There is an interesting multi-factor investigation protocol there indeed: https://repost.aws/knowledge-center/diskfull-error-rds-postgresql

In particular, I released occupied storage space by dropping replication slots unused once DMS task stopped.

A well known AI has generated some SQL to show the respective storage space used per DB.

SELECT pg_database.datname AS database_name,
       pg_size_pretty(pg_database_size(pg_database.datname)) AS size
FROM pg_database
ORDER BY pg_database_size(pg_database.datname) DESC;

However, it turns out that none is responsible. The largest DB is about 300 MB, and the 3 others are about 8 MB. The bloating data clearly come from somewhere else... and I don't know where.

answered 7 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions