RDS w/Postgres GB-Mo usage keep growing without reason.

1

Hello,

As a student, I'm currently training in AWS architecture.

My project is the following:

  • Using a python script to scrape data every day, which is stored in an S3 bucket (700kb CSV file)
  • Lambda function triggered when the file is added, which runs a script to clean and update an RDS database with Postgres

My financial framework is in the freetier offered by AWS.

My problem is as follows: in the monitoring, I see the GB-Mo usage increasing by one Gb every one or two days (as a reminder of the free tier: 20.0 GB-Mo for free for 12 months as part of AWS Free Usage Tier (Global-RDS:StorageUsage)).

However, the file uploaded each day does not exceed 700 kB. I've deactivated automatic backup, and the log files (one per hour at 4 kB per file) are a maximum of 120 kB/day.

The current database consists of two tables, one of 800 kB and one of 2360 kB.

This means that the size of the database increases by about 1 MB per day, yet every 24 to 48 hours, usage increases by one GB, and I can't figure out why.

I launched my instance in the middle of the month, so I shouldn't exceed the free tier this month, but I'm worried about next month.

Do you know how I can solve this problem? Either a misconfigured element is increasing storage usage, or I've misunderstood the notion of 20 GB-Mo...

Thanks in advance!

2 Answers
1

Hi, probably the first to do is to run ANALYZE to better understand your storage usage and its growth. Then, you may have to VACUUM if auto_vacuum is not active:

profile pictureAWS
EXPERT
answered a year ago
0

Hello and Thank you Didier,

I've checked and tired this but unfortunatly, nothing has changed. The size keep growing, my database is "only" 28 MB today, and i'm at 15 GB-Mo of use. I'm trying to check the log files but i'm stuck with privileges actually.

Pouleto
answered a year 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