Can the EC2 spot instance request expiration time be configured?
TeamCity seems to be creating ec2 spot instance requests with a 10 minute expiration by setting the valid until value to now + 10 minutes. Is there any way to change this value?
Occasionally ec2 will take longer than 10 minutes to fulfill the request, this leads to it expiring and being cancelled. This cycle repeats, until the spot instance request limit is reached for the account. (Cancelled spot instance requests count towards the limit, and can take several hours to clear).
The teamcity cloud log will start filling with entries like this:
on.async.AmazonAsyncClientImpl - Amazon connection error during Start New Instance for image: ami-xxx Amazon EC2 connection (profile 'aws spot'{id=amazon-2, projectId=_Root}): Max spot instance count exceeded (Service: AmazonEC2; Status Code: 400; Error Code: MaxSpotInstanceCountExceeded; Request ID: xxx) Failed to start instance
Please sign in to leave a comment.
Hi,
Unfortunately, it's not possible at the moment, but please feel free to open a ticket at https://youtrack.jetbrains.com/.
Should be quite easy to fix. Most likely, the limit will be configurable via internal property.