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
asked 6 months ago250 views
1 Answer
1
Accepted Answer

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
EXPERT
answered 6 months ago
profile picture
EXPERT
reviewed 6 months ago
  • 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.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions