jamesyonan/brenda

MaxSpotInstanceCountExceeded when max spots should not have been exceeded

Opened this issue · 2 comments

I just signed up with aws. My spot limit for c1.xlarge seems to be 20, but brenda is getting a MaxSpotInstanceCountExceeded back from amazon.
I have one spot running and it is the only one I've managed to start. Anyone know what could be happening?

trist@bizmuth:~$ brenda-run -P -i c1.xlarge -N 1 -p 0.15 spot
----------------------------
AMI ID: ami-0529086c
Max bid price 0.15
Request type: persistent
Instance type: c1.xlarge
Instance count: 1
Instance store device: /dev/sdb
SSH key name: brenda
Security groups: ('brenda',)
Startup Script:
   #!/bin/bash
   # run Brenda on the EC2 instance store volume
   B="/mnt/brenda"
   if ! [ -d "$B" ]; then
     for f in brenda.pid log task_count task_last DONE ; do
       ln -s "$B/$f" "/root/$f"
     done
   fi
   export BRENDA_WORK_DIR="."
   mkdir -p "$B"
   cd "$B"
   /usr/local/bin/brenda-node --daemon <<EOF
   AWS_ACCESS_KEY=[redacted]
   AWS_SECRET_KEY=[redacted]
   BLENDER_PROJECT=s3://grindtamp-bucket/amazon_grindtamp_render.tar.gz
   WORK_QUEUE=sqs://grindtamp-bucket
   RENDER_OUTPUT=s3://grindtamp-frames
   DONE=shutdown
   EOF
Traceback (most recent call last):
  File "/usr/local/bin/brenda-run", line 169, in <module>
    main()
  File "/usr/local/bin/brenda-run", line 150, in main
    run.spot(opts, conf)
  File "/usr/local/lib/python2.7/dist-packages/brenda/run.py", line 100, in spot
    reservation = ec2.request_spot_instances(**run_args)
  File "/usr/local/lib/python2.7/dist-packages/boto/ec2/connection.py", line 1647, in request_spot_instances
    verb='POST')
  File "/usr/local/lib/python2.7/dist-packages/boto/connection.py", line 1186, in get_list
    raise self.ResponseError(response.status, response.reason, body)
boto.exception.EC2ResponseError: EC2ResponseError: 400 Bad Request
<?xml version="1.0" encoding="UTF-8"?>
<Response><Errors><Error><Code>MaxSpotInstanceCountExceeded</Code><Message>Max spot instance count exceeded</Message></Error></Errors><RequestID>047e4eda-adfc-43ba-bc58-e1115c66a5e8</RequestID></Response>

Were you able to figure this out? I am having the same issue.

Yes, I requested an increase in spot instance requests from amazon. That did the trick.