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.

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则