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 個月前檢視次數 259 次
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.

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南