How long is the Error 429 TooManyRequests cooldown? - httprequest

I accidentally caused my code to send over 4500 requests to the News API and now I am locked out of the API response.
The News API website just tells to back off for a while in their Error documentation, but there is no actual waiting time mentioned. I've already waited over 3 hours.
Is the cooldown specific to the server or are these things universally same?
Do I need to wait to tomorrow (24 hours) ?
There was no Retry-After header as far as I can tell.

OK, I got reply from the API support. 500 requests / 12h => 1k/day.

Related

How can I limit the number of requests my Ktor Clientside can make to an endpoint?

I am using the Notion API and weirdly enough, i never recieve the error code for exceeding the rate limit, my request just get timeouted out, even with 3 retries spaced by 15 seconds each but I know I am exceeding the number of 3 request per seconds.
I found some thing in the documentation of ktor client side but I didn't understand how it works
Documentation
I didn't understand what I tried, it made requests slower but not enough to be below 333ms
I found some github things but it was made for Ktor server and I am using ktor client

Mule 4 long running httpRequest -http request that connects sap system which takes 10 minutes to give response

in mule 4 have to trigger http request with post to sap system , sap system takes 10 minutes to give response, but DLB only keeps the http request for 5 minutes and after 5 minutes getting http time out error, how to solve this issue pls help me out
You have to change the request to take less than 5 minutes. There is no way around it. Ask for less data or design an API that can process responses asynchronously.
That timeout is to prevent the DLB to run out of resources under load. Even 5 minutes can be too high depending on load.

Does gcloud-node have a way to set the http timeout for uploading files to storage?

I'm uploading small files (via Bucket.upload), and occasionally I get a 503 or 500 from the google backend, but it usually returns that after ~5 or ~10 seconds (I assume it's the timeout on google's end). I noticed in gcloud-node util it sets the request timeout to 60 seconds, but I don't see to be able to find a way to set the timeout myself.
Thanks!
On my phone while playing with Mickey Mouse figurines with my daughter, so my answer can't be too long. Check out Request interceptors: https://googlecloudplatform.github.io/gcloud-node/#/docs/v0.28.0/gcloud
Hopefully that helps!

windows phone push notifications 406 not acceptable

I'm getting 406 Not Acceptable as response when I try to send a push notification, I understand the problem and I've fixed the code that was causing it but I'm not quite sure how to make the error go away, the server responds with 406 to every one of my requests for push notifications. Will this happen by itself after a period of time or? Thanks.
This isn't an error you should (or could) do something about. It just means that you sent too many notifications to the same device or too many notifications per second, and you have to wait until you can send more.
406 Not Acceptable
This error occurs when an unauthenticated cloud service has reached the per-day throttling limit for a subscription, or when a cloud service (authenticated or unauthenticated) has sent too many notifications per second. The cloud service can try to re-send the push notification every hour after receiving this error. The cloud service may need to wait up to 24 hours before normal notification flow will resume.
(Source)
Fixed itself after a while, half a day or so.

Is there a way to check the Foursquare venue rate-limit without actually costing a request?

I am currently pinging the foursquare venue platform in order to harmonize my company's data with foursquare's. Information on the venue harmonization is here: https://developer.foursquare.com/overview/mapping
The rate limit is in the headers as X_RATELIMIT_REMAINING. I have a producer pushing out new requests and a consumer which touches the foursquare api. I would like to find out a way to have the producer check the rate limit without spending the remaining requests.
Does anyone know of a way to do this?
Unfortunately, there is no "dummy" enpoint to check your ratelimit. They have a multi endpoint but as far as I can remember they'll count each requests inside the batch.
You can count the ratelimit on your side. Here is an explanation :
The window should still update be updating in real time.
To be clear, if your rate limit is 500, at 11:00, you send 5 requests,
the X-RateLimit-Remaining will be 495. If you wait a few minutes to
11:05, and send another request, X-Rate-Limit remaining will be 494 --
it won't have reset yet.
It's not until 12:01 that you'll get back the 5 requests that you'd
made at 11:00. So, if you request again at 12:01, your limit would be
498 (-1 for the request you just did, -1 for the 11:05 request).
Requesting again at 12:06, and you'll be back up to 499 (the full
limit, minus what you just used).
from this thread : API Quota exceeded
If you reproduce this logic and count each request you make per endpoint, you can guess your ratelimit. I'm sorry there is not an easier way to do this :(