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?

질문됨 3년 전781회 조회
4개 답변
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 .

답변함 3년 전
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

답변함 3년 전
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

답변함 3년 전
0

thank you!

답변함 3년 전

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

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

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

관련 콘텐츠