Critical Deployment Issues with WordPress on Elastic Beanstalk and RDS

0

I deployed WordPress on Elastic Beanstalk with an integrated RDS instance. After activating the WooCommerce plugin, the website became unresponsive, prompting me to re-enter database details. Then I tried accessing the EC2 through command prompt with this command "aws ec2-instance-connect ssh --instance-id i-xxxxxxxxxxxxxxxxx", to add some configuration in wp-config.php but it didn't go through so I checked the EC2 instance ID and I can see that the running instance is no longer the one I was using. I assume even if there is an issue with the plugin I installed my EC2 instance should not be replaced. Help me understand what's going on. Thank you guys for any help and insight.

profile picture
Vin
질문됨 7달 전260회 조회
1개 답변
1
수락된 답변

Hi,

AWS ELB can automatically replace instances that it detects as unhealthy:

By default, Amazon EC2 Auto Scaling ignores the results of the Elastic Load Balancing 
health checks. However, you can enable these health checks for your Auto Scaling group. 
After you do this, when Elastic Load Balancing reports a registered instance as Unhealthy, 
Amazon EC2 Auto Scaling marks the instance Unhealthy on its next periodic health check 
and replaces it.

So, read the source page of this paragraph in details at: https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-health-checks.html

See, you may need to update your config to avoid automatic replacement of unhealthy instances.

Best,

Didier

profile pictureAWS
전문가
답변함 7달 전
profile picture
전문가
검토됨 7달 전
  • Thank you for looking into my issue. I checked the link you provided and that guided me as to what to know further. When I checked the reason in Auto Scaling Group, this is what I see "...an instance was taken out of service in response to a difference between desired and actual capacity, shrinking the capacity from 2 to 1." I think the Auto Scaling just behaved normal because when I was creating VPC, I chose 2 availability zones and that prompted me to create 2 EC2 instances. In my scaling configuration, I chose 1 to 4 instances. Then when I was setting up my WordPress that might triggered an event and might captured the CloudWatch and then Auto Scaling Group just did his job to scale down due to low CPU utilization. I'm new to AWS so that caused me a confusion. Thank you guys for all your help.

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

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

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

관련 콘텐츠