Elastic Beanstalk and RDS MySQL connection timeout

0

So, I have a java application that I've deployed to Elastic Beanstalk and an RDS MySQL database instance. Everything works fine except atleast once a day the database connection stops working and I have to restart the EB instance. I'm assuming it's some configuration or something I'm missing; does anyone have any idea why this would happen?

feita há 3 anos782 visualizações
4 Respostas
0

Have you setup the inbound rules correctly. From my experience, once you set the inbound rules, there should be no issues. For information about setting up security group inbound rules, see https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.RDSSecurityGroups.html .

respondido há 3 anos
0

So I need to create a specific MYSQL/Aurora inbound security group type for EB -> RDS?

Edited by: waterPrescription on Dec 15, 2020 7:17 AM

respondido há 3 anos
0

Correct - its best practice to set the inbound rules so the IP of your Elastic Beanstalk instance is allowed to interact with the RDS instance. We cover that point in the AWS Tutorial that talks about creating a Java web app that interacts with RDS. See: https://github.com/awsdocs/aws-doc-sdk-examples/tree/master/javav2/usecases/Creating_rds_item_tracker .

See the section under Set up the RDS instance. I had this app deployed on AWS Elastic Beanstalk and once the inbound rules were setup, i never had database connectivity issues.

Edited by: PowerUserScott on Dec 15, 2020 9:33 AM

respondido há 3 anos
0

thank you!

respondido há 3 anos

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