1

I have an AWS RDS MySql Cluster. I'm trying to Auto Scale on Mass Write operations, but unable to do so. But, when I'm Running Read Queries it Scales properly. I'm getting "Too Many Connections" error on write. Can anyone let me know what I'm doing wrong? Thanks in advance.

[Edit: 1]

Screenshot of AWS RDS Cluster Config enter image description here

I've kept the connection limit to 2 because I was testing.

When I'm sending Multiple read requests to AWS RDS I can see new Instances being launched in my RDS Instances Section: enter image description here I've also set Scale In Cool Time to 0 so that it will launch a new Instance Instantly. When I'm reading from the database using read endpoint, Auto Scaling is working properly. But when I'm trying to insert data using write endpoint, Auto-Scaling is not working.

enter image description here

1

1 Answer 1

1

Your question is short on specifics so I will list some possible ways to figure this out and possible solve it.

RDS scaling takes time, so you cannot expect that your DB will increase in capacity instantly when a sudden spike of traffic exceeds its current capacity.

The maximum number of connects to a MySQL instance is set by max_connections in your parameter group. How many connections are happening and what is the max_connections value? This value affects memory usage, so be review any changes. Note: Increasing this value does not always help if there is a bug in your client code that erroneously creates too many connections. If the number of peak connections is exceeding the max_connections value, sometimes you just need to scaled up to a larger instance. Details determine the correct solution.

Use MySQL's Gobal Status History and look into what happens and when. This is useful for detecting locking or memory issues.

Sign up to request clarification or add additional context in comments.

7 Comments

Hey John, I have added more details. A load balancer is used. I know it takes time to launch new instances. I have waited for 2 days (way too long) before posting the question. I have even tried different permutations-combinations. And max connections I'm trying to achieve right now it 2 as you can see in the above image. As I'm currently doing POC. Load balancing Instances are getting launched, but, only during read operations.
I made a mistake reading your question. I missed the "write queries" part. Aurora does not scale on writes. You need to select an instance class to handle expected write traffic. Aurora scales for reads using replicas and does not scale for writes.
Thanks, John "You need to select an instance class to handle expected write traffic" How can I do this. I'm new to AWS Clusters.
@JohnHanley not sure what exactly do you mean by "Aurora does not scale on writes. "? Aurora has autoscaling and does bump up instance type, storage, read replicas already. docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/…
@Achilleus - Can you find a reference for write autoscaling? Aurora autoscales on reads by adding read replicas. The instance size is changed manually. Writes do not autoscale.
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.