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?

gefragt vor 3 Jahren782 Aufrufe
4 Antworten
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 .

beantwortet vor 3 Jahren
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

beantwortet vor 3 Jahren
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

beantwortet vor 3 Jahren
0

thank you!

beantwortet vor 3 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen