Google Analytics Management API 500内部服务器错误 [英] Google Analytics Management API 500 Internal Server Error

查看:118
本文介绍了Google Analytics Management API 500内部服务器错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个应用程序,可以从Management and Reporting API中获取数十个Google用户的Google Analytics(分析)元数据和统计信息.

I have an application which gets Google Analytics metadata and statistics for a couple dozens google users from Management and Reporting API.

一切正常(几个月),但一切正常,但昨天UTC下午21:00左右,其中一个(用户)开始收到此错误:500,后端错误或有时出现InternalError

Everything was ok for a long period (several month), but yesterday around 21:00 pm UTC one of them (user) started getting this error: 500, Backend Error or sometimes InternalError

他的Management API请求:
获得所有帐户响应,其中包含360个项目的响应是200个
获取所有WebProperties响应是200个,包含170个项目
获得所有个人档案"响应是200个,包含1000个项目
得到所有目标响应为500,但有错误[应该是1000个项目,但现在有错误]

His Management API requests:
get all Accounts response is 200 with with 360 items
get all WebProperties response is 200 with 170 items
get all Profiles response is 200 with 1000 items
get all Goals response is 500 with error [should be 1000 items, but error now]

现在(超过24小时)仍然收到此错误.

And still getting this error for now (More than 24 hours).

顺便说一句,此客户端的Reporting API也可以正常工作(针对他的一个视图/个人资料)

By the way, Reporting API for this client works fine too (for one of his view/profile)

我研究了什么:
我尝试要求的目标不是全部,而是针对一个特定帐户>特定属性>特定配置文件,并且api响应为200 OK!在这种情况下!
长期以来,所有配置文件的早期请求目标都运行良好!但是今天不是.

What i researched:
I've tried to request goals not for all, but for one specific account > specific property > specific profile, and api response is 200 OK! in this case!
Earlier request goals for all profiles worked fine, for a long period! But not today.

推荐答案

500和503错误基本上是严重的加载错误.正在处理您的请求的服务器花了很长时间来处理您的请求,因此超时.您需要记住,您不是唯一访问服务器的人.很可能是其他开发人员在运行,这降低了您的请求速度并导致错误.

500 and 503 errors are basically sever load errors. The server that is processing your request took to long to process your request so it timed out. You need to remember that you are not the only one accessing a server. It could very easily be something that another developer was running that slowed down your request and resulted in an error.

您应该实施指数补偿,而只需再次尝试该请求.

You should implement exponential backoff and just try the request again.

最重要的提示:不要在要与要执行cron作业的每个人竞争的那一刻开始运行.同样在美国西部午夜运行的时候,每个人的配额都重新设置,现在也不是攻击服务器的好时机.

更新:

团队建议您在问题跟踪器上此处.管理API团队可以查看一下.从Google Developer控制台添加您的帐户信息.我将添加有问题的配置文件.将问题链接回这里,我将其发送给他们.

The team would like to suggest that you post an issue on the issue tracker here. The management API team can have a look at it. Add your account info from Google Developer console. I would add the profile in question. Link the issue back here and I will send it to them.

如果您正在运行以下请求,我认为您应该停止这实际上并不意味着返回大量数字.

If you are running the following request I think you should stop that's really not meant for returning huge numbers.

analytics.Management.Goals.List("~all", "~all", "~all");

这篇关于Google Analytics Management API 500内部服务器错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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