503 Service Unavailable when threading?

2019-07-03 23:33发布

问题:

I get some information via Youtube API V3 with 5 simultaneous thread and just after the launch I have some "503 Service Unavailable" response. When I re-launch the same video it can be ok or not... So it seems there is no problem on my side.

My quota is ok (30k per seconde...)

So what is the problem??

Thanks

I'm using just list video API, for example:

$ time curl --silent "https://www.googleapis.com/youtube/v3/videos?id=AX7Z5eqosxM&part=id%2Csnippet%2CcontentDetails%2Cplayer%2Cstatistics%2Cstatus%2CtopicDetails&key={MY_API_KEY}"
{
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "backendError",
    "message": "Backend Error"
   }
  ],
  "code": 503,
  "message": "Backend Error"
 }
}
real    0m30.692s
user    0m0.024s
sys 0m0.024s

回答1:

I don't think you're doing anything wrong—there's nothing inherent in v3 that should prevent a large volume of those calls form succeeding, as long as you're within normal quota limits.

I've seen some other reports of this as well with videos.list() calls, so I've created https://code.google.com/p/gdata-issues/issues/detail?id=4020 to keep track of the issue publicly.



回答2:

Google develop has a Error Responses page to explain different error codes

https://developers.google.com/analytics/devguides/reporting/core/v3/coreErrors

In this page, they also provide some implementation Exponential Backoff, that might be helpful for you. But I agree with Jeff that there is nothing more we can do but waiting.



标签: youtube-api