Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

builder/amazon-ebs: RequestLimitExceeded error during instance shutdown #4030

Closed
erickt opened this issue Oct 19, 2016 · 3 comments
Closed

Comments

@erickt
Copy link

erickt commented Oct 19, 2016

Good afternoon,

We're using a combination of packer 0.10.0, spinnaker and Datadog on AWS, which is generating a large number of AWS requests. We are hitting similar error messages as the bugs #50 and #709 because Packer doesn't appear to implement the Amazon recommended exponential backoff:

...
==> amazon-ebs: Stopping the source instance...
==> amazon-ebs: Waiting for the instance to stop...
==> amazon-ebs: Error waiting for instance to stop: RequestLimitExceeded: Request limit exceeded.
==> amazon-ebs:     status code: 503, request id:
==> amazon-ebs: Terminating the source AWS instance...
==> amazon-ebs: No AMIs to cleanup
==> amazon-ebs: Deleting temporary security group...
==> amazon-ebs: Deleting temporary keypair...
Build 'amazon-ebs' errored: Error waiting for instance to stop: RequestLimitExceeded: Request limit exceeded.
    status code: 503, request id: 
...

I saw that terraform did implement exponential backoff in hashicorp/terraform#1787. Could something like this be replicated in packer?

Thanks!

@mwhooker
Copy link
Contributor

Hmm, the aws sdk we use already implements retrying when the request is throttled. However, it looks like we set the value to 11 https://github.com/mitchellh/packer/blob/master/builder/amazon/common/access_config.go#L37

If you feel comfortable, you can try removing WithMaxRetries and seeing if you still get the issue.

Removing it will let the service set its own default max retries.

If removing it doesn't help, you can try setting it to a big number like 100.

Feel free to send a PR with whatever ends up working out the best

@mwhooker mwhooker changed the title Handling AWS Rate Limits with exponential backoff AWS not retrying through Rate Limiting Oct 19, 2016
@mwhooker mwhooker added builder/amazon build-failure For issues compiling Packer labels Oct 19, 2016
@erickt
Copy link
Author

erickt commented Oct 19, 2016

Thanks for the reference. We will try that out and let you know.

@mwhooker
Copy link
Contributor

Should be fixed in #4083 by setting the polling delay to a higher number.

@ghost ghost locked and limited conversation to collaborators Apr 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants