vagrant-aws icon indicating copy to clipboard operation
vagrant-aws copied to clipboard

RequestLimitExceeded exception

Open pyromaniac opened this issue 10 years ago • 8 comments

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.

pyromaniac avatar Apr 24 '14 02:04 pyromaniac

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?

beelit94 avatar Jul 11 '15 17:07 beelit94

Currently, my workaround is just keep retrying vagrant up until I don't see any error

beelit94 avatar Jul 13 '15 03:07 beelit94

@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 avatar Jul 13 '15 04:07 madhurranjan

@madhurranjan, could you share the patch that you achieved this? Thanks.

yupeng9 avatar Nov 25 '15 05:11 yupeng9

https://github.com/madhurranjan/vagrant-aws/commit/6b12feeaed13db5ee2bd876f38dbf1ff41be1729 There you go.

madhurranjan avatar Nov 26 '15 19:11 madhurranjan

Awesome. Thanks for sharing the solution, @madhurranjan!

yupeng9 avatar Nov 27 '15 17:11 yupeng9

See: https://github.com/mitchellh/vagrant-aws/issues/483

lawrenceong avatar Sep 05 '16 05:09 lawrenceong

Pull request open for the fog-aws gem: https://github.com/fog/fog-aws/pull/361

VVMichaelSawyer avatar Apr 25 '17 22:04 VVMichaelSawyer