javascript - 消费者的服务 'AnalyticsDefaultGroup' 的配额 'USER-100s' 和限制 'analyticsreporting.googleapis.com' 的 token 不足

标签 javascript node.js google-analytics google-api

我正在使用 async.eachOfSeries 超过 300 个数组并请求一些 GA api,它工作正常但有时我会收到错误..

UnhandledPromiseRejectionWarning:错误:配额 token 不足

'AnalyticsDefaultGroup' and limit 'USER-100s' of service 'analyticsreporting.googleapis.com' for consumer 'project_number:79317181646'.

最佳答案

Limits and quotas

In the API Console, there is a similar quota referred to as Requests per 100 seconds per user. By default, it is set to 100 requests per 100 seconds per user and can be adjusted to a maximum value of 1,000. But the number of requests to the API is restricted to a maximum of 10 requests per second per user.

这个错误是防洪。每个用户每秒只能发送 100 个请求。用户由您的 ip 地址表示。你需要放慢速度。

注意:Google 并不完美,您可以在一秒钟内发送 99 个请求,然后尝试等待 90 秒并重试,它可能会或可能不会成功。放慢速度再试一次。

关于javascript - 消费者的服务 'AnalyticsDefaultGroup' 的配额 'USER-100s' 和限制 'analyticsreporting.googleapis.com' 的 token 不足,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50945197/

相关文章:

javascript - 如何使用mapboxgl.js向 map 添加图 block 图层

node.js - 使用pm2启动node.js应用程序: bad gateway from proxy_verse server

javascript - 正则表达式 - 忽略内部 word + html

javascript - 如何使用 Browserify 分离文件中的 Angular 模块和 require ?

node.js - 如何使用 npm 安装 Node.js 包

iphone - 如何在 iPhone Titanium 应用程序中集成 Google Analytics

google-analytics - Adwords/Analytics:如何查看基于浏览器类型的转化统计信息

google-analytics - `fullVisitorId` => clientId,一对多映射?

使用递归的 JavaScript 排列

Javascript通过递归获取子节点对象