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 Resposta
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
ESPECIALISTA
respondido há 7 meses

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas