vagrant-aws
vagrant-aws copied to clipboard
RequestLimitExceeded exception
Hello. When we are starting about 20 instances in parallel - it raises RequestLimitExceeded from AWS API. The problem is here: https://github.com/mitchellh/vagrant-aws/blob/master/lib/vagrant-aws/action/run_instance.rb#L135, server.wait_for
send requests every second. To avoid this just need to use second argument - server.wait_for(2, 5)
- and requests will be every 5 seconds.
I'm having the same issue, I try to start 40 machine but half of them fail with error "RequestLimitExceeded" And I've checked the source code in vagrant-aws has already got what @pyromaniac mentioned After roughly review the code I think the one doing parallization is Vagrant itself in "batch_action.rb" My guess we need to be able control the throttle in Vagrant with some argument Anyone have encountered the same issue? Any idea?
Currently, my workaround is just keep retrying vagrant up until I don't see any error
@beelit94 I've a class level variable that manages with a limit of 9 that makes sure at any point of time only 9 instances are brought up. I faced a lot of issues when I increased it to any number beyond 9.
@madhurranjan, could you share the patch that you achieved this? Thanks.
https://github.com/madhurranjan/vagrant-aws/commit/6b12feeaed13db5ee2bd876f38dbf1ff41be1729 There you go.
Awesome. Thanks for sharing the solution, @madhurranjan!
See: https://github.com/mitchellh/vagrant-aws/issues/483
Pull request open for the fog-aws gem: https://github.com/fog/fog-aws/pull/361