Can't connect to MySQL server on '*.cluster-*.us-east-8.rds.amazonaws.com' error

0

Hi,

i have a python app that runs on a ec2 and connects to a RDS MySQL Database on an Aurora Instance (not Aurora serverless). It works if a small amount of users use it. But once like 20+ users hit it at the same time i get the error Can't connect to MySQL server on '*****.cluster-*******.us-east-8.rds.amazonaws.com' error.

I read that the max connections could be responsible for that. But from what i read that fully depends on the RAM of the RDS.

Therefore i tried upgrading from a t3 large to a r5 large. But that sadly did not make a difference.

BUT: My application is build in such a way that even when multiple users use it there is basically only the 1 single application making the calls to the database. And i read somewhere that there is also a second max connections per user variable that could be the cause of it. I sadly did not find where that is tho.

So my question in general is if someone maybe has experience with getting this error when they use the RDS too hard and what could potentialy be done to troubleshoot (to find the cause) and then of course fix it so it can handle a larger amount of users

1개 답변
0

Hello.

We recommend checking the RDS audit and error logs to troubleshoot connection counts.
I think it is also necessary to check whether there are any abnormal values ​​in "DatabaseConnections" in CloudWatch metrics.
https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.AuroraMonitoring.Metrics.html

If there is an abnormality in the number of connections, it may be improved by editing "max_connections" directly in the parameter group.
https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Managing.Performance.html

Also, if the number of connections is an issue, using RDS Proxy may be effective.
https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/rds-proxy-planning.html

profile picture
전문가
답변함 7달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠