Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why every time Elastic Beanstalk issues a command to its instance it always timed out?

I have a PHP application deployed to Amazon Elastic Beanstalk. But I notice a problem that every time I push my code changes via git aws.push to the Elastic Beanstalk, the application deployed didn't picked up the changes. I checked the events log on my application Beanstalk environment and notice that every time the Beanstalk issues:

Deploying new version to instance(s)

it's always followed by:

The following instances have not responded in the allowed command timeout time (they might still finish eventually on their own): [i-d5xxxxx]

The same thing happens when I try to request snapshot logs. The Beanstalk issues:

requestEnvironmentInfo is starting

then after a few minutes it's again followed by:

The following instances have not responded in the allowed command timeout time (they might still finish eventually on their own): [i-d5xxxxx].

like image 808
ardfard Avatar asked Apr 03 '14 08:04

ardfard


People also ask

When should you not use Elastic Beanstalk?

Elastic Beanstalk isn't great if you need a lot of environment variables. The simple reason is that Elastic Beanstalk has a hard limit of 4KB to store all key-value pairs. The environment had accumulated 74 environment variables — a few of them had exceedingly verbose names.

How does Elastic Beanstalk monitor memory usage?

You can use Elastic Beanstalk configuration files (. ebextensions) to monitor memory utilization with CloudWatch for . NET on Windows Server with IIS. Note: By default, the CloudWatch agent is installed on all Elastic Beanstalk Windows environments running platform versions 2.0.

Does Elastic Beanstalk have static IP?

A single-instance environment in Elastic Beanstalk comes with a static IP address that's known as an Elastic IP address. You use a single-instance environment in Elastic Beanstalk to allow traffic from the IP address to access an external partner application, API, or other entity.

How do I add static files to Elastic Beanstalk?

Configure static files using the consoleIn the navigation pane, choose Configuration. In the Software configuration category, choose Edit. In the Static files section, enter a path for serving static files and the directory of the static files to serve into the empty row at the bottom of the list.


1 Answers

I had this problem a few times. It seems to affect only particular instances. So it can be solved by terminating the EC2 instance (done via the EC2 page on the Management Console). Thereafter, Elastic Beanstalk will detect that there are 0 healthy instances and automatically launch a new one.

If this is a production environment and you have only 1 instance and you want minimal down time

  1. configure minimum instances to 2, and Beanstalk will launch another instance for you.
  2. terminate the problematic instance via EC2 tab, Beanstalk will launch another instance for you because minimum instance is 2
  3. configure minimum instance back to 1, Beanstalk will remove one of your two instances.
like image 144
chongzixin Avatar answered Oct 02 '22 21:10

chongzixin