错误"RESOURCE_EXHAUSTED"的原因是什么? [英] What is the reason for the error "RESOURCE_EXHAUSTED"?

查看:125
本文介绍了错误"RESOURCE_EXHAUSTED"的原因是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个wordpress博客.登录仪表板时,顶部突出显示了以下异常:

I have a wordpress blog. When I logged in to the dashboard, the following exception was highlighted at the top:


[Ga_Lib_Api_Request_Exception] There was an error while contacting Google API: {
"error": { "code": 429, "message": "Insufficient tokens for quota group and limit
'AnalyticsDefaultGroupCLIENT_PROJECT-1d' of service 'analyticsreporting.googleapis.com',
using the limit by ID '123******456'.", "status": "RESOURCE_EXHAUSTED",
"details": [ { "@type": "type.googleapis.com/google.rpc.Help",
"links": [ { "description": "Google developer console API key",
"url": "https://console.developers.google.com/project/207216681371/apiui/credential"}]}]}}

从异常消息中,我可以推断出它与Google Analytics(分析)及其API有关.

但是,我很想知道是什么原因导致了此异常.另外,为了避免此类异常,我可以采取哪些步骤?

From the exception message I could infer that it is something related to Google Analytics and its API.

However, I'm curious to know what could have caused this exception. Also, what steps can I take in order to avoid such exceptions?

推荐答案

Manoj为您提供了技术信息,我将为您提供一些额外的信息,并回答问题的以下部分.

Manoj gave you the technical information I am going to give you a bit of extra info and answer the following part of your question.

但是,我很想知道是什么导致了此异常.另外,为了避免此类异常,我可以采取哪些步骤?

However, I'm curious to know what could have caused this exception. Also, what steps can I take in order to avoid such exceptions?

当我们作为开发人员想要访问Google API时,我们需要向Google注册我们的应用程序.每个API都有开发人员需要跟踪的不同配额.

When we as developers want to access Google APIs we need to register our application with Google. Each API has a different quota that the developers need to keep track of.

配额是您可以向API发出的请求数.

a quota is the number of requests you can make to an API.

例如:考虑默认情况下的Google Analytics(分析),每个应用程序用户每秒最多可以发出10个请求,这是为了防止服务器泛滥.每天您最多可以向每个Google Analytics(分析)视图发出10000个请求.大多数配额是基于用户的,但是有一个基于项目的配额.RESOURCE_EXHAUSTED就是这样的配额之一.

For example: Considering the Google analytics by default each user of an application can make a maximum of 10 requests a second this is to prevent flooding the servers. You can also make a maximum of 10000 requests to each Google analytics View per day. Most of the quotas are user based however there is one that is project based. RESOURCE_EXHAUSTED is one such quota.

默认情况下,基于项目的Google Analytics(分析)配额为50000个请求.如果您有大量用户,所有用户都在发出请求,那么您很快就会用完配额.例如,我的应用程序上的配额是500000,我的用户每天运行约70%.达到此配额后,将无法执行任何操作,直到将配额重置为美国西部时间午夜(美国西部时间).

By default the project based quota for google analytics is 50000 requests. If you have a large number of users all making requests you can quickly run out of quota. The quota on my application for example is 500000 my users run though about 70% of that each day. Once you hit this quota there is nothing that can be done the application is locked out until the quota is reset at midnight west cost USA time.

可以做些什么来避免它.首先,插件的作者需要请求额外的配额,以便他们可以更好地为用户提供服务,还应该定期检查该配额,以使用户永远不会看到它.可能要花一个月的时间才能获得额外配额的批准.作为用户,您可以通过不花大量的每日配额来提出需要的请求来提供帮助.

What can be done to avoid it. First off the author of the plugin needs to request an additional quota so that they can service their users better they should also be checking this periodically so that there users never see it. Its probably going to take them a month to get approved for additional quota. As a user you can help by only making requests that you need to make there by not using to much of the daily quota up.

正如Manoj所说,您无法亲自解决此问题,您需要联系插件的作者.

As Manoj stated there is nothing you can do personally to fix this you will need to contact the author of the plugin.

这篇关于错误"RESOURCE_EXHAUSTED"的原因是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆