Once a min (1,440 times/day), I'm reading a Gmail mailbox from an Azure Logic App. After 2 days, it consistently returns 429-Too many requests. The quota threshold is 20,000/day. It has not run successfully since.
You might be running into the threshold for Concurrent Requests of gmail due to the parallel actions of Logic Apps. This will also return the 429 error.
What are you exactly doing in the logic app?
Based from this documentation, the Gmail API enforces the standard daily mail sending limits.
These limits are per-user and are shared by all of the user's clients, whether API clients, native/web clients or SMTP MSA. If these limits are exceeded a HTTP 429 Too Many Requests "User-rate limit exceeded" error mentioning "(Mail sending)" is returned with a time to retry. Note that daily limits being exceeded may result in these types of errors for multiple hours before the request is accepted, so your client may retry the request with standard exponential backoff.
These per-user limits cannot be increased for any reason.
The mail sending pipeline is complex: once the the user exceeds their quota, there can be a delay of several minutes before the API begins to return 429 error responses. So you cannot assume that a 200 response means the email was successfully sent.
You may try considering exponential backoff. Here's also an additional link which might help: Gmail API error 429 rateLimitExceeded even where is no any activity
Related
On occasion I'm getting a rate limit error without being over my rate limit. I'm using the text completions endpoint on the paid api which has a rate limit of 3,000 requests per minute. I am using at most 3-4 requests per minute.
Sometimes I will get the following error from the api:
Status Code: 429 (Too Many Requests)
Open Ai error type: server_error
Open Ai error message: That model is currently overloaded with other requests. You can retry your request, or contact us through our help center at help.openai.com if the error persists.
Open ai documentation states that a 429 error indicates that you have exceeded your rate limit which clearly I have not.
https://help.openai.com/en/articles/6891829-error-code-429-rate-limit-reached-for-requests
The weird thing is the open ai error message is not stating that. It is giving the response I usually get from a 503 error (service unavailable).
I'd love to hear some thoughts on this, any theories, or if anyone else has been experiencing this.
I have seen a few message on the OpenAI community forum with similar messages. I suggest checking out the error code guide we have with suggestion to mitigate these errors, in general though, it's possible the model itself was down and has nothing to do with your rate limit: https://platform.openai.com/docs/guides/error-codes
This error indicates the OpenAI servers have too many requests from all users and their servers have reached their capacity to service your request. It's pretty common at the moment.
Hopefully they will upgrade their servers soon. Not really sure why it is a big problem since they run on Azure and should be able to scale based on ramped up demand. Maybe they are just trying to minimise costs.
I am running a nodejs app on Heroku free tier.
Free tier is more than enough for occasional traffic, just a few times a month for a backend admin system.
However, if a few multiple Rest API calls were made within 1 or 2 minutes, it will encounter timeout error. Actual scenario - my node server is receiving WhatsApp replies coming from Twilio - Twilio uses webhook to call the REST API from my node server hosted at Heroku free tier. Multiple WhatsApp replies of about 10 - 20 is expected but could come in within a minute. Node server receives the data from Twilio and writes to FireStore for each WhatsApp reply.
I am reading Heroku's help document on how to deal with request time-outs > https://help.heroku.com/PFSOIDTR/why-am-i-seeing-h12-request-timeouts-high-response-times-in-my-app
Can I increase the number of web workers under the current Free unverified account?
I tried from the Heroku CLI and get the following response
heroku ps:type worker=standard-2x
› Warning: heroku update available from 7.59.2 to 7.60.2.
▸ Type worker not found in process formation.
▸ Types: web
If I get my account verified by adding a credit card, how many web workers can I add to the existing free dyno?
If I stay at Free tier, without upgrading to say Hobby tier. Even if there is unexpected event of a spike in traffic, my dyno will just go to sleep once the free dyno hours are used up - Heroku will not automatically charge my credit card for the excess traffic right? I am very concern due to news about Firebase users charged for thousands of dollars due to unexpected spike in traffic and there is no way to cap or limit it.
If I am expecting up to 20 simultaneous/concurrent REST API calls to my node server at Heroku within a minute - how many web workers should I increase?
On a free account, you can only have one worker at a time. If you add more dynos, you will be charged.
When your free Heroku dyno sleeps because it is not being used, if it receives a new request it has to wake up. Waking up takes quite a bit of time and likely is longer than Twilio's 10 second timeout for HTTP responses. I think your app is probably failing not because of the spike of traffic especially as you are using Node which can handle multiple connections with ease, but because your sleeping dyno times out.
You might find some benefit adding the same URL as the fallback URL for your number. That would allow Twilio to call your server, wake it up and if it fails the first time because it timed out, the fallback URL will make a second attempt which would hopefully succeed.
In reality, the best practice is to pay for an account that allows you to keep your dyno running the whole time.
My application sends requests to Azure Machine Learning REST API in order to invoke a batch endpoint and start scoring jobs as described here. It works well for small number of requests, but if the app sends many concurrent requests the REST API sometimes responds with status code 429 "TooManyRequests" and message "Received too many requests in a short amount of time. Retry again after 1 seconds.". For example, it happened after sending 77 requests at once.
The message is pretty clear and the best solution I can think about is to throttle outgoing requests. That is making sure the app doesn't exceed limits when it sends concurrent requests. But the problem is I don't know what are the request limits for Azure Machine Learning REST API. Looking through the Microsoft documentation I could only find this article which provides limits for Managed online endpoints whereas I'm looking for Batch endpoints.
I would really appreciate if someone helped me to find the Azure ML REST API request limits or suggested a better solution. Thanks.
UPDATE 20 Jun 2022:
I couldn't find out how many concurrent requests are allowed by Azure Machine Learning batch endpoints. So I ended with a limit of 10 outgoing requests which solved the "TooManyRequests" problem. In order to throttle requests I used SemaphoreSlim as described here.
According to the document, there is chance to enhance the quota of the request limit which is the way to solve the request limit exceed issue. Regarding batch quota limit, here is the document designed by Microsoft.
According to the above image, change the quota values.
Document Credit: prkannap and team
Alternatively, you could reduce the number of requests by storing multiple input files in a folder and invoking the job with the folder path.
If you want further assistance, please file a support ticket and a customer support engineer will assist you.
According to the documentation there a limitation for REST API to Bitfinex:
If an IP address exceeds 90 requests per minute to the REST APIs, the requesting IP address will be blocked for 10-60 seconds and the JSON response {"error": "ERR_RATE_LIMIT"} will be returned. Please note the exact logic and handling for such DDoS defenses may change over time to further improve reliability.
For users who need high-frequency connections, please switch to the WebSockets APIs.
But what is the limit for order count via Socket API (v2) using NodeJS?
After some experiments, I found that request limit is 500 orders per 10 mins, but after a minute or 2 of the ban, you can post 500 requests more.
I use Amazon's Product Advertising API to retrieve their node hierarchy using the API's BrowseNodeLookup method (REST using Java). On Amazon's sandbox individual requests seem to work but if I keep sending requests for various nodes I eventually end up getting HTTP 503 errors.
One of previous posts on an Amazon's forum indicated a limit of 20 requests per second on sandbox: https://forums.aws.amazon.com/thread.jspa?messageID=152657𥑑
After I put throttling in place I tried limiting code to send 20 requests/sec, as well as 10 requests/sec. In both cases I ended up eventually getting a 503 error. I had posted my question on Amazon's forum but have not received any information so I was wondering whether anybody knows answers to the following questions:
What kind of limits does the sandbox environment impose in this case?
Are those or similar limits in place in the production environment?
Do those limits apply to both REST and SOAP calls?
Maybe 10 requests/sec is too many?
I am having the same problem. I found this link that mentions 1 request/sec.
http://www.mail-archive.com/google-appengine#googlegroups.com/msg19305.html
It's approximately 2,000 per hour; with the opportunity to scale up if you're a merchant shipping a lot of product sold through their marketplace.
One way to help with this limit is by batching multiple requests in each API call - they're treated as one invocation, for the purposes of Amazon's rate-limiting governor. Not only does that help with throughput by permitting larger sets of requests to be issued; but because you're not dealing with intermachine latency (between your app & the Amazon server handling your API request) you're making up a bunch of time there, as well.