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?


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.


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.