The default formula use by AWS RDS to calculate the max_connections
parameter is: LEAST({DBInstanceClassMemory/9531392},5000)
But It's hard to find the exact value of DBInstanceClassMemory
.
So, here are the values I got when I ran the SQL commmand: show max_connections;
in some RDS instances:
Instance type | RAM (GB) | max_connections |
---|---|---|
db.t2.small | 2 | 198 |
db.t2.medium | 4 | 413 |
db.t2.large | 8 | 856 |
db.m4.large | 8 | 856 |
db.r4.large | 15.25 | 1660 |
These are default values. You can always change the max_connections
value in the parameters group of your DB.
Using describe_db_instances I'm getting the value of
db_instance_class
which isdb.m4.2xlarge
.db_instance_class
, is there a way I can directly get the value ofmax_connections
?aws rds describe-db-parameters --db-parameter-group-name mdsol-postgres11 --source system
which is as below:But, now I am not sure what I should pass to
LEAST({DBInstanceClassMemory/9531392},5000)
how can I can get the value of max_connections as show here