Using Zend FW based Youtube api. Often getting errors on page load
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>
Or
Read timed out after 10 second
Googled it and found usefull advise: set timeout to 180. But it doesn’t help. Again, this error occurs not everytime, but often.
$yt = new Zend_Gdata_YouTube();
$yt->getHttpClient()->setConfig(array('timeout'=>180));
How to deal with that problem?
But the real reason can be be something else, like a configuration error.
P.S: put you`re code in a try and catch the error.