Php Zend framework youtube api超时问题

Php Zend framework youtube api超时问题,php,zend-framework,youtube-api,Php,Zend Framework,Youtube Api,使用基于Zend FW的Youtube api。页面加载时经常出错 Fatal error: Uncaught exception 'Zend_Gdata_App_HttpException' with message 'Expected response code 200, got 503 <errors xmlns='http://schemas.google.com/g/2005'><error> 谷歌搜索后发现有用的建议:将超时设置为180。但这没用。同样,此错

使用基于Zend FW的Youtube api。页面加载时经常出错

Fatal error: Uncaught exception 'Zend_Gdata_App_HttpException' with message 'Expected response code 200, got 503 <errors xmlns='http://schemas.google.com/g/2005'><error>
谷歌搜索后发现有用的建议:将超时设置为180。但这没用。同样,此错误并非每次都发生,而是经常发生。

$yt = new Zend_Gdata_YouTube();
$yt->getHttpClient()->setConfig(array('timeout'=>180));
如何处理这个问题

503服务不可用

由于发生错误,服务器当前无法处理该请求 服务器的临时过载或维护。这意味着 这是一种暂时的情况,经过一段时间后会得到缓解 延迟如果已知,延迟的长度可以用 在标头之后重试。如果没有在之后重试,客户端应该 像处理500响应一样处理响应

  Note: The existence of the 503 status code does not imply that a
  server must use it when becoming overloaded. Some servers may wish
  to simply refuse the connection.
但真正的原因可能是其他原因,比如配置错误。 附言:把你的代码放进去,试着抓住错误

  Note: The existence of the 503 status code does not imply that a
  server must use it when becoming overloaded. Some servers may wish
  to simply refuse the connection.