Highest value of max_connections in AWS RDS micro instance

Solution 1:

About 2 years ago, I was tasked with evaluating Amazon RDS for MySQL. I wrote some posts in the DBA StackExchange about my findings and observations:

  • Jul 25, 2012 : Scaling Percona datacenters: setup and replication
  • Aug 02, 2012 : Local database vs Amazon RDS
  • Sep 21, 2012 : MySQL 5.5 Runs Out of Memory, Drops All Connections When Creating Many Databases

In short, there are three options you cannot alter

  • max_connections (per Server Model)
  • innodb_buffer_pool_size (per Server Model)
  • innodb_log_file_size (all Server Models, 128M)

Here is the Chart I made telling you those per-Server Model limits

MODEL      max_connections innodb_buffer_pool_size
---------  --------------- -----------------------
t1.micro   34                326107136 (  311M)
m1-small   125              1179648000 ( 1125M,  1.097G)
m1-large   623              5882511360 ( 5610M,  5.479G)
m1-xlarge  1263            11922309120 (11370M, 11.103G)
m2-xlarge  1441            13605273600 (12975M, 12.671G)
m2-2xlarge 2900            27367833600 (26100M, 25.488G)
m2-4xlarge 5816            54892953600 (52350M, 51.123G)

As for your actual question, t1.micro has 34 as a max_connections setting. If you cannot surpass 32, that is quite understandable. Amazon AWS must be able to connect to and monitor things for the RDS Instance as a SUPER user. Not being able to go beyond 32 is reasonable for a t1.micro instance. In light of this, you will have no choice but to trust the management scheme administered by Amazon for apportioning max_connections and other options among all MySQL Instances in the AWS Cloud.

Solution 2:

Here's what you can do to change max_connections or any other parameter in an AWS RDS (mysql) instance:

  • From RDS console go to Parameter Groups
  • Create a new parameter group based on the default group and name it my-param-group
  • Modify max_connections or other parameters in my-param-group
  • Go back to instance main page and click Modify in Instance Action button to modify the instance
  • Choose my-param-group as the DB Parameter Group
  • Reboot your instance
  • Done!

Solution 3:

It appears that things have changed since the accepted answer. After seeing this thread I ran a test on a db.m3.medium RDS MySQL instance with max_connection manually set to 2000 using DB Parameter Groups. I was able to create 2000 connections and only then got the expected error of Too Many Connections.