Asad Feroz Ali
Asad Feroz Ali

Reputation: 362

Define AWS RDS Postgres Session Limit

Why does RDS Postgres show a session limit of around 2? Refer to the image below. Is it just because of the instance being t3.medium or is it because there has to be some parameter to be set in RDS? I searched and couldn't find a parameter that calculates max sessions? Couldn't find any info on it in AWS FAQs and documentation for RDS as well.

enter image description here

enter image description here

Looking forward to your help guys.

Upvotes: 2

Views: 5273

Answers (1)

Rajan Sharma
Rajan Sharma

Reputation: 2273

If you are thinking to increase the number of connections for the RDS instance.

AWS RDS max_connections limit variable is based on Instance type, so you can upgrade your RDS or make more replica.

However, You can change the max_connections value by updating the default parameter policy.

  • Go to RDS
  • Parameter Groups (if you don't have one, create a new one)
  • search for the max_connections value
  • Change the value ( according to your need)
  • Go to RDS instance modify it with the parameter group(select the parameter group for the instance)
  • Restart the instance.

This would override the current max_connections value.However, when you actually start having number of connected clients going up, after a point, server wont be able to allocate enough memory for each connection which would result in connection drops.

Talking about the sessions metric, it has been added to measure the performance metrics of your RDS instance.

Why does Performance Insights measure database load in sessions?

Sessions, in this case, is shorthand for “average active sessions,” sometimes abbreviated “AAS.” An active session is a database connection that has submitted a request to the database but has not yet received the response. Measuring the average number of active concurrent sessions over time provides a clear picture of the load on the database.

Kindly go through the article published by amazon for Performance metrics : https://aws.amazon.com/blogs/database/analyzing-amazon-rds-database-workload-with-performance-insights/

It has complete information what does this metric mean and how to improve the performance of your instance.

I hope this would help you understand!

Upvotes: 4

Related Questions