Skip to content

ElasticBeanstalk stuck

0

I have a testing EBT environment with min 1 and max 2 servers t3.micro. I overloaded that one server. It stopped reacting. The EBT environment reported that the instance is not delivering any data but did not restart the server nor start a replacement one. I cliked Restart instance in console, it started the operation and did nothing for more than 9 minutes.

I would expect EBT environment to start a replacement server as soon as it finds out that the instances in it are not in a good shape. But that apparently does not happen. The service is happy in Severe state doing nothing.

Is there a way how to get it running somehow or is that service simply so bad and one must do it all manually?

asked 2 years ago412 views

2 Answers
1
Accepted Answer

I updated the configuration this way: Switched from network LB to app LB. Configured the health check properly for ALB so that it is the same as the check for autoscaling. See the documentation about ALB configuration.

This way now my autoscaling removes an unhealthy instance and starts a new healthy one.

answered 2 years ago

EXPERT

reviewed 2 years ago

1
The behavior you're experiencing with your Elastic Beanstalk (EB) environment is not typical, and there are several steps you can take to address this issue:

1. Auto Scaling: Elastic Beanstalk uses Auto Scaling to maintain application availability. By default, it should replace unhealthy instances. Check your Auto Scaling group settings to ensure they're configured correctly.

2. Health Checks: Verify that your application's health check URL is properly configured. If the health check is not set up correctly, EB may not accurately detect when an instance is unhealthy.

3. Instance Recovery: In cases where an instance becomes unresponsive, EB should typically attempt to recover or replace it. The fact that this isn't happening suggests there might be an underlying issue with your environment's configuration.

4. Manual Intervention: While EB is designed to handle many scenarios automatically, there are times when manual intervention is necessary. In your case, you may need to terminate the unhealthy instance manually and allow EB to launch a new one.

5. Environment Rebuild: If the issue persists, consider rebuilding your environment. This process terminates all resources and replaces them with new ones while preserving the same configuration.

6. Monitoring and Logs: Check the EB console for any error messages or events that might explain why the environment isn't behaving as expected. The environment's logs can provide valuable insights into what's happening behind the scenes.

7. AWS Support: If you've tried these steps and are still experiencing issues, it may be worth contacting AWS Support for further assistance.

Elastic Beanstalk is generally a reliable service, but like any complex system, it can sometimes encounter issues. The key is to ensure proper configuration and to have monitoring and alerting in place to catch and respond to problems quickly.

To improve your environment's resilience in the future, consider:
- Implementing custom CloudWatch alarms to alert you of issues
- Using multiple Availability Zones for high availability
- Regularly testing your application's ability to scale and recover from instance failures

Remember, while EB aims to automate many aspects of application deployment and scaling, it's still important to understand its behavior and be prepared to troubleshoot when necessary.
  

Sources
Troubleshooting Elastic Beanstalk - Categories and FAQs - AWS Elastic Beanstalk
Rebuilding Elastic Beanstalk environments - AWS Elastic Beanstalk
AWS Elastic Beanstalk Product Details - Amazon Web Services (AWS)

answered 2 years ago

EXPERT

reviewed 2 years ago

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.