Comments (21)
Two instances. We use immutable environment updates, which slows our deployment down a bit compared to rolling deploys.
As far as I can tell, it's not necessarily just the frequency (5s) that's the issue, but that the frequency is too much over the ~15-20 minutes it takes for EB to finish our immutable deployment. I'm thinking there's a # of updates per X minutes cap, not just a per second cap.
In any event, we were previously using the command line eb deploy
option for our deployment, and that worked fine, so maybe you can just use the same polling period they did?
from beanstalk-deploy.
@dblarons Just published v6 https://github.com/einaregilsson/beanstalk-deploy/releases/tag/v6 which polls less for updates. Try it out and let me know whether it works.
from beanstalk-deploy.
Ok, have published v7 which logs the number of API calls when getting the throttling error. If anyone who gets the throttling error uses it and gets the error, please post back here how many api calls were made. Right now I'm thinking maybe if you have a lot of instances it's calls times instances, so that's why it happens, but it's just a theory for now.
from beanstalk-deploy.
@kceb That's actually a great idea, and what I probably should have been doing from the start. I've uploaded a special branch to try it out, can you try using
uses: einaregilsson/beanstalk-deploy@throttletest
in your deployment script and see whether that works for you? It will allow up to 5 consecutive requests to fail with a throttle error before failing the deployment, and will log a warning if it gets a throttle error. If it does work, please let me see the logs to get an idea of how many times the requests were throttled.
from beanstalk-deploy.
Published v8 which has the throttletest
branch merged in. Don't log it as a warning anymore when getting a throttled requests, just log it normally. Closing this issue now, will re-open if there are more problems.
from beanstalk-deploy.
Ok, haven't seen that one. We basically start the deployment, and then poll every 5 seconds to get the status, so the task doesn't finish until the deployment is finished. That doesn't seem like enough requests to get you throttled. You're not using the same IAM key for other stuff at the same time, or doing multiple deploys or anything like that?
from beanstalk-deploy.
Has anybody else come across this issue or have any suggestions on how to rectify it?
I also had this once. I gave it time to resolve and haven't seen it again. I didn't think that I should have been hitting the rate limit, but also I'm not exactly sure what's rate limited.
from beanstalk-deploy.
According to this, although it's for EC2: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/throttling.html#throttling-how
you should have 100 Describe* requests per second allowed, so we shouldn't be anywhere near any limits. No idea what's happening here :/
from beanstalk-deploy.
Thanks @einaregilsson @dhimmel! Haven't seen the issue again for a few days now so hopefully it stays away. We're using a dedicated IAM key for just this deployment workflow so it shouldn't be that. Perhaps it's something to do with the way AWS measure request rates? Anyway I'll close this issue for now and let you know if it comes up again.
from beanstalk-deploy.
I'm seeing this issue every time I deploy. I have a dedicated IAM key that I just created for my workflow.
from beanstalk-deploy.
What does your environment look like? Many instances?
from beanstalk-deploy.
Ok, I'll look into this next week. Either making the polling interval configurable, or by using some kind of exponential backup, where for long deploys it starts polling with longer intervals the longer the deploy is.
from beanstalk-deploy.
Sounds great — thank you!
from beanstalk-deploy.
@einaregilsson I tried the new version three times. Once a few hours after you released it (QA), and twice today (Prod, then QA). It timed out the first time, but worked the latter two times. It's possible that there was an issue with Github Actions picking up the new version (as unlikely as that seems).
I think all is good, but I'll keep you posted as I do a few more releases. Thanks for your help!
from beanstalk-deploy.
Facing the same exact issue as @dblarons
I'm on v6 and I consistently get the ##[error]Deployment failed: Error: Status: 400. Code: Throttling, Message: Rate exceeded
error on my immutable deploys. Also set up a specific IAM user just for CI.
Screenshot: https://kceb.d.pr/KXadPD
@dblarons are you still experiencing the issue?
from beanstalk-deploy.
@kceb Weird, it's really not making that many calls! Maybe I should add some logging of how many requests have been sent during the deployment.
If you know CloudTrail there's a chance you could see something there: https://aws.amazon.com/premiumsupport/knowledge-center/elastic-beanstalk-api-throttling-errors/
from beanstalk-deploy.
@kceb — Yes, I was still having the same issue. I ended up setting up the EB command line to work in my Github Action instead. Code below in case it saves anyone else some time.
- name: Clone Elastic Beanstalk CLI
id: clone-awsebcli
run: git clone https://github.com/aws/aws-elastic-beanstalk-cli-setup.git
- name: Install Elastic Beanstalk CLI
id: install-awsebcli
run: ./aws-elastic-beanstalk-cli-setup/scripts/bundled_installer
- name: Beanstalk Deploy Beta
id: test-beanstalk-deploy
run: /home/runner/.ebcli-virtual-env/executables/eb deploy $ENVIRONMENT_NAME --version $VERSION_LABEL --timeout 15
The downside to this method, and why I prefer @einaregilsson's solution, is that it doesn't provide you with any logs until the deploy is finished.
@einaregilsson — I would love to use your project once the throttling is worked out. I'm sorry I can't help out more, I just needed to rush to get this done so I can get back to some other code :) I did spend a while looking through your code and noticed, if I understand it correctly, that you sometimes fire off two API requests at the same time. That was the only thing that stuck out to me that could potentially cause a problem. Other than that your v6 code made sense.
from beanstalk-deploy.
@dblarons I'm thinking about adding a verbose
option to the script that logs the number of requests and more extra stuff, to try to understand why this happens. Maybe I need to try to make an environment with immutable updates, see if I can reproduce this. Like any error it's hard to fix when I can't reproduce it :)
from beanstalk-deploy.
Will post back here if I do find something out.
from beanstalk-deploy.
Got the following:
https://kceb.d.pr/pQaPDT
However, some of my merges deploy to multiple environments in parallel. My guess is that is what is hitting the limit.
Is it possible to ignore the 400 limit as an error?
you should have 100 Describe* requests per second allowed, so we shouldn't be anywhere near any limits. No idea what's happening here :/
I don't think I'm anywhere near this limit
from beanstalk-deploy.
During a deploy I have which deploys to two environments in parallel I noticed the warning appear once. It was an immutable deploy so it took around 1 hour total to deploy both in parallel.
##[warning]Request to DescribeEnvironments was throttled, that's 1 throttle errors in a row...
It didn't consider the build failed, so that's good. I'll probably continue using the throttletest
branch for now.
I will continue testing and perhaps test on a deploy that deploys to 5 environments
from beanstalk-deploy.
Related Issues (20)
- Error: Deployment failed: Error: Status: 400. Code: Throttling, Message: Rate exceeded
- using the CLI tool in github actions
- Deployment breaks when run during an already ongoing deployment HOT 1
- Deploy Elastic Beanstack using Assume role
- Deployment failed: Error: Status: 301. HOT 1
- Use node 20 runner HOT 2
- Call for maintainers HOT 7
- How to pass AWS role instead of Access Keys HOT 2
- Specify Environment CNAME instead of Environment Name as the target
- Error: Deployment failed: Error: Environment still has health Yellow 120 seconds after update finished! HOT 1
- Error: Deployment failed: Error: Deployment failed! Current State: Version: Sample Application, Health: Green, Health Status: Info
- How to set option_settings? HOT 2
- Failure undetected, resulting in 6 hour timeout HOT 3
- support working-directory
- docker deploy HOT 1
- Windows support? HOT 1
- Upd runtime to node16 HOT 2
- Is this action still supported? HOT 5
- dynamic version_label is not working HOT 1
- Deployment fails HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from beanstalk-deploy.