本文介绍了503 线程时服务不可用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过具有 5 个并发线程的 Youtube API V3 获取了一些信息,并且在启动后我收到了一些503 服务不可用"响应.当我重新启动相同的视频时,它可以正常或不正常......所以我这边似乎没有问题.

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.

我的配额没问题(每秒 30k...)

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

那是什么问题??

我只使用列表视频 API,例如:

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

推荐答案

我不认为你做错了什么——v3 没有任何内在的东西可以阻止大量的调用成功,只要你'在正常的配额限制内.

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.

我在video.list() 调用中也看到了其他一些报告,因此我创建了https://code.google.com/p/gdata-issues/issues/detail?id=4020 以公开跟踪问题.

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.

这篇关于503 线程时服务不可用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-10 18:23