20

Currently, the value for the max_connections parameter in a MySQL RDS t1.micro server model is {DBInstanceClassMemory/12582880} is 32.

Since my server does not allowing any more connections after 32, what is the Maximum safe value for max_connections I can use for a micro instance ?

31

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:

In short, there are three options you cannot alter

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.

  • Nice answer. but I thought I can change it in custom Parameter group. So there is no other way than increasing Instance size? – Straw Hat May 29 '14 at 13:30
  • Only those 3 options are immutable for the sake of the fair distribution CPU cycles, Memory, and Overall Performance to all running MySQL RDS instances. – RolandoMySQLDBA May 29 '14 at 13:33
  • All the links are helpful. you saved a day for me – Straw Hat May 29 '14 at 13:36
  • 1
    To check your max_connections, try this command: select @@max_connections; – stevendaniels Apr 9 '16 at 23:43
  • 1
    See my answer below serverfault.com/a/740138/104677 – advncd Jan 16 '17 at 19:52
12

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!
  • 1
    I think this should be the accepted answer now – lucaConfa Oct 25 '17 at 4:51
9

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.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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