9

I am using AWS RDS with MySQL for a project and have a "large" instance. The documentation is clear on what this means as far as compute resources and RAM goes, but I can't find anything that documents how many open database connections that I can have. The app that I am using is PHP and it utilizes PDO with persistent connections. This means that the number of open connections could reach the maximum number of PHP child processes running at any given point. How do I ensure that my RDS instance has a max connections setting high enough to be comfortable with this?

4 Answers 4

16

According to this 2011 blog post, the max connections on RDS instances come out this way:

t1.micro: 34 connections ($0.035)
m1.small: 150 connections ($0.115)
m1.large: 640 connections ($0.455)
m1.xlarge: 1263 connections ($0.920)
m2.xlarge: 1441 connections ($0.655)
m2.2xlarge: 2900 connections ($1.315)
m2.4xlarge: 5816 connections ($2.630)

No AWS docs I can find demonstrate this information is current, but other sources suggest if it isn't, it's very close. You can find your instances max connections with:

show variables like '%conn%';

from the mysql terminal, or via an SDK.

1
  • thanks I'd scoured the docs with no luck. Great find!
    – wmarbut
    Aug 6, 2012 at 18:52
3

You can always check actual value in AWS console. Open RDS -> DB Parameter Groups, probably you have only one parameter group there, e.g. default.mysql5.5. Then, check max-connections parameter. In my case it is {DBInstanceClassMemory/12582880}, ie ~50 connections for micro instance, ~150 for small etc.

2

From RDS Console > Parameter Groups > Edit Parameters,

You can change the value of the max_connections parameter to a custom value.

0

We can change the limit but the connection is not extending for RDS instance type t3.medium. Max 100 connections are there. After that web server goes down. Can anyone suggest to increase the connection limition?

1
  • As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
    – Community Bot
    Jul 2 at 17:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.