RESOURCE_EXHAUSTED error when making requests to the Google Assistant API - grpc

After some time playing with the Google Assistant SDK, I start getting this error:
grpc._channel._Rendezvous: <_Rendezvous of RPC that terminated with
(StatusCode.RESOURCE_EXHAUSTED, Insufficient tokens for quota
'ConverseGroup' and limit 'DailyLimit' of service
'embeddedassistant.googleapis.com' for consumer 'project_number:
<REDACTED>'.)>
What does this mean and how can I resolve this?

The Google Assistant SDK is free to use but has some daily usage limits per account, to prevent abusive use of the API (e.g. non personal or non developmental use, as allowed by the terms of service).
This trace is the error you get when hitting that limit.
The most immediate solution to this problem, is to try again the next day. If you need more requests for your project, you can also reach out to this form to request more quota explaining what your project is about and why you need it.

Related

RESOURCE_EXHAUSTED error when linking a GCS bucket to firebase (projects.buckets.addFirebase)

I have a script that creates a GCS bucket, links it to firebase and apply firebase rules on the bucket. Recently, I am running into this error that it cannot link the GCS bucket to firebase.
I am using the REST method projects.buckets.addFirebase to import the GCS bucket to firebase.
https://firebasestorage.googleapis.com/v1beta/{bucket=projects/*/buckets/*}:addFirebase
The response from the API says that the resource exhausted.
{
"error": {
"code": 429,
"message": "Resource has been exhausted (e.g. check quota).",
"status": "RESOURCE_EXHAUSTED"
}
}
So I checked the quota for firebase googleapis and it says the per minute usage has reached the limit. Okay, if that is the case, why doesn't it reset even after days of inactivity. I get the error every time I issue the request. If it is a per minute limit, why doesn't it reset the next minute? If I reach the per minute limit once, can't we use the service ever after?
I tried deleting the firebase security rules (storage and firestore) and still I get the same error.
I really don't understand the error and the quota it is linked to. How do I overcome this error? I am now not able to add any bucket to firebase. I know that we can increase the quota, but I might end up in the same situation when that limit also exceeds.
When you run out of quota, the task you're trying to complete, such as deploying an app, starting a new project, or contacting an API, usually fails and you get a quota error. Until you free up resources (for allocation quota), the time period resets (for rate quota), or you seek and are granted a quota increase, the task will continue to fail.
This error can be triggered by a message rate quota that has been exceeded, a device message rate quota that has been exceeded, or a topic message rate quota that has been exceeded.
The error 429 indicates that you may be violating Google's Terms of Service (especially under d. API Limitations).
When you made too many calls, you were probably put on a blacklist, which expires in some time. The limit for People API. You need to apply for higher quotas.
Setting up monitoring to inform you when you're approaching quota restrictions will help you avoid quota errors. More information on monitoring your quotas may be found in the section Monitoring and alerting on quota metrics later in this publication.
Google does not reveal all the rates that it restricts, ostensibly to prevent circumvention or to allow for more flexibility in enforcement.
Here is also a link regarding Limits and Quotas on API requests.
Finally, I was able to solve this issue.
Looks like there were some orphaned buckets in the firebase side (that were soft-deleted) and they were causing the issue.
In order to get rid of them I had to issue an API request to list the buckets.
https://firebasestorage.googleapis.com/v1beta/{parent=projects/*}/buckets?pageSize=1000
I assume that this cleared the orphaned buckets and after that I was able to create new gcs buckets and add them to firebase
https://firebasestorage.googleapis.com/v1beta/{bucket=projects/*/buckets/*}:addFirebase
I was not sure, if this was the issue and the solution to it. So, I tried the same in my another project which also had the same issue. And it worked.
Let me know if this is the right solution, or something that worked out by luck :)

WSO2 APIM gives HTTP Status code 429 - Too Many Request

I am running WSO2 APIM 2.1.0 , I am setting Tier Availability to Unlimited . Still getting 429 too many request error while doing load testing.
You need to make changes as per given in document.
If you have custom throttling policies, it has some issues with WSO2-2.1.0. Better to get upgraded to wso2-2.6.0.
There are many possible reasons for this kind of issue.
Are you trying throttling scenario on unauthenticated API? When you are going to add a new Subscription level throttling tier in the admin portal, you could see the existing list of subscription tiers in the Subscription Tier List. In this list, you will find a tier named Unauthenticated which has a request quota of 500. This is a subscription tier that automatically applied when the authentication type of your resources is 'None'. That is used when you can invoke APIs without tokens. And this tier is not visible in the Throttling tier list of the application.
Please check the Traffic Manager node connectivity.
Check whether any other throttling tier like application, API, resource level are published with the API.
Check the unit time while you are getting the throttled out response. Invoke the API after unit time getting passed. If the unit time is a larger value, then you should restart the server and try again.
Check the throttling configurations in the gateway, traffic manager, and the publisher.

StackDriver User Quotas

I'm using the Java client library's MetricServiceClient for getting StackDriver timeseries. I am authenticating using a user oauth token (this user has access to multiple projects), but there seems to be some kind of global quota across multiple projects because when I fetch only one or two projects at a time I have no throttling, but when I fetch four or five different projects at a time, I start getting throttled with errors like the following:
io.grpc.StatusRuntimeException: RESOURCE_EXHAUSTED: Insufficient tokens for quota 'DefaultGroup' and limit 'USER-100s' of service 'monitoring.googleapis.com' for consumer 'project_number:764086051850'.
I have confirmed this by alternating which projects are being fetched so that I can say it is not any single project -- they all start to get rate limited. Another strange thing is, that project_number in the error message doesn't correspond to any project I am fetching, or even have access to -- it is meaningless to me.
This appears to be the quota for # of requests per 100 seconds, but I have that set to 10,000 on all projects and I'm not doing nearly that many requests, as the quota historical chart in the web console confirms.
Is there really some global quota that applies across multiple projects and if so, is there some way to work around it? It is much simpler to me to have a single user with access to multiple projects instead of having to make service account tokens for them all.
The token quota you're hitting is for users using Application Default Credentials (which uses a shared gcloud project for billing), while it exists to get users up and run quickly but it's not recommended for actual production use. Therefore using a proper service account bound to the user's project is highly recommended and the solution to the issue.

Firebase storage Quota has been exceeded

I have set up a test account on firebase just for development purposes.
I made use of the storage feature and so I uploaded manually an image with the size of 400kb which later I downloaded through an IOS application.
All of a sudden the application stopped working and I cannot access the storage from the console.. I get the message "warning Can't connect to server. Try again in a few minutes."
By searching in the stackoverflow, I found some people claiming that this has to do with multiple google accounts signed in from the same browser etc..
The IOS application though, logs the following error:
Error Domain=FIRStorageErrorDomain Code=-13000 "An unknown error occurred, please check the server response." UserInfo={object=images/nicewall.jpg, bucket=partyreports-49b0a.appspot.com, ResponseBody={
"error": {
"code": 402,
"message": "Quota has been exceeded for this project. Please visit the Firebase pricing page to learn more."
}
Please pay attention to the message "Quota has been exceeded.."
How is this even possible? The analytics/events shows "session_start:193" which I assume is how many times the application connected to the Firebase.
Now if my calculations are correct 193x400KB is way less than the 30GB traffic limit..
It is worth noting that I have a second project setup under the same account which I don't use at all.. and the storage is accessible..
After googling a bit, I found that I should have billing information setup.. and so I did.. after a few minutes I can access the storage again..
How can I tell what was wrong?
Was it the billing account? Or that was a random incident?
I do NOT believe my app exceeded the limits
How often the limits reset?
Where can I see the actual limits for each service/feature?
Thanks and sorry for the long post!
Sorry you had issues! Here are some answers:
Was it the billing account? Or that was a random incident?
Unsure why it happened--it's possible that there's a bug in our quota system, or it's possible that you ended up storing or sending more data than you thought. I'm not sure how you're using storage, but if you've got a 400kB image and we have a 1GB/day limit, that's 2500 downloads/day. If you've got 200 users, and they use the app routinely, and the file is downloaded on app start every time, that might explain extra usage.
Our free plan offers 30GB outgoing bandwidth per month, 5GB of data storage total , and 20,000 uploads and 50,000 downloads operations per day--once these limits are hit, the app won't work until the quota resets, or until you upgrade your app. Once you upgrade, the quota limit is removed and the app works, which is why your problem went away.
How often the limits reset?
The bandwidth is 30GB/month, enforced as a daily limit (so every 24 hour period means you're allotted 1GB of bandwidth). This limit resets every day.
Storage is 5GB total, and once exceeded you need to remove additional data (or upgrade your plan) before the app works again.
Operations are 50,000 downloads and 20,000 uploads per day.
See the quota limit docs for more info.
Where can I see the actual limits for each service/feature?
We're working on exposing usage data for each service in their respective sections of the Firebase Console. Stay tuned for more on this.
I had te same issue,
I had upgraded it to blaze plan and then deleted some of the data from the storage and then again downgrade the plan to free and it will start working for testing
firebase limits the number of new Email/Password and Anonymous accounts that your application can create in a day from a single IP address.
you can check this out to change and schedule sign up quota.
Found this in firebase project authentication settings.
For future ref please use cached_network_image and for videos cached_video_player cause believe it or not i just blew through the 1GB limit withing an hour testing the video player using a stored 1mb video. The band with is a problem amongst other things on firebase so cache where you can and if you cant i suggest you find other file hosting services

Azure Request Queue Limit Exceeded

I need to run a report which needs to extract information from a WCF service which is running as an Azure Web App. Unfortunately, there are about 6000 requests I need to run and they MUST be run individually.
When I throw the entire book at the service, I get
ASP.NET rejected this request because the queue limit was exceeded.
I can't find any information which says what the Request Queue Limit is per pricing tier.
Does anyone know what the limits are?
This is not an Azure limit, the queue length is IIS/CPU/Memory bound. See this ServerFault answer for a brief explanation. You should consider having your app queue/throttle the requests with a mechanism like Azure queues.

Resources