Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How come the elastic agent doesn't shut down when idle?

Karsten Silz October 18, 2012

I configured a Bamboo plan in our OnDemand trial. It runs against a Bitbucket Git repository with the "Default Image S3 i386 (linux) (stock image)" and builds fine. However, neither the Elastic Agent nor the EC2 instance shut down when being idle. In the configuration, the "Elastic Instance Management" was set to "Passive", so the "Idle Agent Shutdown Delay" was 10 minutes. And the "Shutdown Delay" for the EC2 instance was set to 300 (seconds, I guess).

However, the agent was idle for about 20 minutes without doing anything. When I manually requested it to stop, it sat there with a "(Stop requested)" message (or similar) for another couple of minutes. Finally, I terminated the instance manually through Bamboo.

So, how do I get the Elastic Agent and the Elastic Instance to shut down after five minutes of idle time?

2 answers

1 accepted

3 votes
Answer accepted
James Dumay
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 18, 2012

Kartsen, the automatic instance management will keep the Elastic Agent running for the whole hour that you have paid for so you get the most value out of your agents.

For example, if an EC2 instance costs 18 cents for an hour and you shut it down after using it for only 20 minutes then start another instance it has costed you 36 cents total.

If the instance has been idle and you approach the full hour you have used Bamboo will shut it down before it costs you another hour.

EDIT: On second thoughts, if it got stuck when you requested it to stop then that sounds like a bug. Best bet is to contact OnDemand support.

hughperkins July 13, 2013

That's not how EC2 works. You get billed on a per-hourly basis, for the maximum number of simulltaneous instances running during that hour. Therefore, if you shut down an instance, and start a new instance, within the space of one hour, you only get billed for one hour-instance.

I would like to be able to get my linux instance to shut down when idle, so that the Windows instance can come online and do the windows build, but currently this isn't possible.

Daniel Santos
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 6, 2016
Each time you start a stopped instance we charge a full instance hour, even if you make this transition multiple times within a single hour.

Reference: Stop and Start Your Instance - Amazon EC2

 

0 votes
hughperkins July 13, 2013

That's not how EC2 works. You get billed on a per-hourly basis, for the maximum number of simulltaneous instances running during that hour. Therefore, if you shut down an instance, and start a new instance, within the space of one hour, you only get billed for one hour-instance.

I would like to be able to get my linux instance to shut down when idle, so that the Windows instance can come online and do the windows build, but currently this isn't possible.

Andreas Kostyrka December 11, 2016

You are mixing up Google and Amazon. What you described is the way Google tries to minimize your bill. Amazon OTOH, just counts hours, and count non-full hours also as one hour.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events