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?

demandé il y a 3 ans783 vues
4 réponses
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 .

répondu il y a 3 ans
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

répondu il y a 3 ans
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

répondu il y a 3 ans
0

thank you!

répondu il y a 3 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions