I have an Elastic Beanstalk (EB) set up with a running application on a PHP/Apache server. The application was running OK since many hours ago when the EB's health got subtly RED and I don't know why. No logs was available on EB > My Application > Logs > Request Logs > Full Logs (and also Last 100 Lines).
And these were the last events on my EB until its health got RED, on EB > My Application > Events:
2015-07-11 04:40:43 UTC-0300 WARN Environment health has transitioned from YELLOW to RED
2015-07-11 04:38:41 UTC-0300 WARN Environment health has transitioned from GREEN to YELLOW
2015-07-11 04:38:41 UTC-0300 WARN Elastic Load Balancer awseb-e-g-AWSEBLoa-1H3WKQE404YBT has zero healthy instances.
2015-07-11 04:38:03 UTC-0300 INFO Removed instance 'i-171a5303' from your environment. (Reason: Instance is in 'shutting-down' state)
2015-07-11 04:31:19 UTC-0300 INFO Removed instance 'i-c0f3bdd4' from your environment. (Reason: Instance is in 'shutting-down' state)
2015-07-11 04:24:11 UTC-0300 INFO Removed instance 'i-908daa73' from your environment. (Reason: Instance is in 'shutting-down' state)
The third event above shows that Load Balancer has zero healthy instances. Why?
Also, we often receive this via email from AWS:
Message: Launching a new EC2 instance. Status Reason: We currently do not have sufficient m3.medium capacity in the Availability Zone you requested (sa-east-1b). Our system will be working on provisioning additional capacity. You can currently get m3.medium capacity by not specifying an Availability Zone in your request or choosing sa-east-1a, sa-east-1c. Launching EC2 instance failed.
If the problem is with the sa-east-1b zone, why didn't AWS automatically launch an instance on sa-east-1a or sa-east-1c zones, as we don't specify any Availability Zone?
We have auto-scaling set up for any Availability Zone. Our Load Balancer is set up for the Availability Zones that we want: sa-east-1a, sa-east-1b or sa-east-1c, but the option Cross-zone load balancing is NOT enabled, because we fear that it might launch instances out of São Paulo (sa-east) region - what we don't want it to do.
So, should I enable the option Cross-zone load balancing on Load Balancing for AWS to get our application up on any Availability Zones in São Paulo (sa-east) region?
Any ideas?!