I used spot instances for the past month, launching and terminating instances. Currently, I've no instances running on AWS (all spot instance terminated). But when I try to launch a new spot instance, it tells me that "Max spot instance count exceeded". I've read the documentation on spot instance limits. However, I'm confused to how this limit works. Is it limiting the number of concurrent instances you can run, or the total instances you ever launched? http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-spot-limits.html#spot-limits-general
Is it limiting the number of concurrent instances you can run, or the total instances you ever launched?
EC2 Limits are per number of concurrent instances you can launch.
I'd suggest to check your current EC2 limits using the AWS Management Console.
Check your current limits for the instance type(s) you want to use and the limits related to the spot instances.
answered Apr 5, 2017 at 0:31 1,614 3 3 gold badges 22 22 silver badges 33 33 bronze badgesIt says I have the default number of spot instances (which should be 20). That's strange because I still can't launch new instances even when I have no instances currently running.
Commented Apr 5, 2017 at 21:11 Yes, it's strange. You should contact the AWS Support for understanding what's going on. Commented Apr 6, 2017 at 8:24 It's actually not the number of instances, but rather the number of vCPUs. Commented Jul 31 at 15:50You may want to check "Spot requests" under EC2 panel. According to the docs:
If you terminate your Spot Instance but do not cancel the request, the request counts against this limit until Amazon EC2 detects the termination and closes the request.
I've found closed requests that didn't cancel automatically, you can cancel them manually to free new requests.
answered Feb 5, 2019 at 16:16 2,009 1 1 gold badge 13 13 silver badges 17 17 bronze badgesThis should be the accepted answer, worked for me, thanks. Very unintuitive, though, - the "EC2 detects the termination" did not happen for me even after an hour.
Commented Apr 25, 2021 at 9:15I was having the same issue and I got a solution by following the below steps.
I was running one autoscaling group of type vt1.3xlarge (12 vCPU) of 6 instances as max.. and I found that the autoscaling group is unable to allocate the 6th instance with the error "Launching a new EC2 instance. Status Reason: Max spot instance count exceeded. Launching EC2 instance failed."
Steps for Solving: Since my instance family name is not directly mentioned in the spot instance limit category
This question is in a collective: a subcommunity defined by tags with relevant content and experts.