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!

Pouleto
已提問 1 年前檢視次數 243 次
2 個答案
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
專家
已回答 1 年前
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
已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南