2
votes

I am using the autoscaling feature. I set up the entire thing but the instance were automatically launched and terminated even if the instance does not reach the threshold.

I followed the steps:

  1. Created an instance
  2. Created a load balancer and registered an instance
  3. Created a launch configuration
  4. Created a cloud watch that cpu >=50 %\
  5. An autoscale policy that launches and terminates the instance when CPU >=50 %

But as soon as I apply the policy the instances begin to launch and terminated without any CPU load and it continues

Cause: At 2014-01-14T10:51:08Z an instance was started in response to a difference between desired and actual capacity, increasing the capacity from 0 to 1. 
StartTime: 2014-01-14T10:51:08.791Z
Cause: At 2014-01-14T10:02:16Z an instance was taken out of service in response to a system health-check.

UPDATE

enter image description here

1
So you had one registered instance running, then you applied the strategy and that instance was taken down or new instance was launched and then taken down? What is your desired capacity? - kukido
No this instance was always there when I registered. But new instances were automatically created and terminated. Desired capacity is between 1 to 2 instance. - user3086014
what is desired capacity ? - user3086014
You should check ping path and ping port on ELB, whether you get response. It seems that ELB brings the instances down as failed healthcheck and Autoscaling is reviving them in a vicious cycle. - kukido
How to do that ? how to check the ping path n port ? - user3086014

1 Answers

1
votes

Documentation:
Follow the instructions on how to Set Up an Auto-Scaled and Load-Balanced Application

Notes:
The instance, created outside of AutoScaling Group can be added to Elastic Load Balancer, but will not be monitored or managed by AutoScaling group.

Instance, created outside of AutoScaling Group can be marked as unhealthy by Elastic Load Balancer if the health check fails, but it will not cause AutoScaling Group to spawn a new instance.