Youtube gdata timeout

I have a problem with the GDATA API for Youtube.

Without making changes to my php settings or code, I can no longer access YouTube through the PHP API.

Creating a new Zend_Gdata_YouTube object and loading the video data throws a "Zend_Gdata_App_HttpException" exception with the following message:

Unable to connect to tcp: //gdata.youtube.com: 80. Error No. 110: Connection time ended "in / usr / share / php / Zend / Gdata / App.php: 688 stack trace: # 0 / usr / share / php / Zend / Gdata.php (221): Zend_Gdata_App-> executeHttpRequest ('GET', 'http: //gdata.yo ...', Array, NULL, NULL, NULL) # 1 / usr / share / php / Zend / Gdata / App.php (875): Zend_Gdata-> executeHttpRequest ('GET', 'http: //gdata.yo ...', Array) # 2 / usr / share / php / Zend / Gdata / App. php (763): Zend_Gdata_App-> get ('http: //gdata.yo ...', NULL) # 3 /usr/share/php/Zend/Gdata/App.php(220): Zend_Gdata_App-> importUrl ( 'http: //gdata.yo ...', 'Zend_Gdata_YouT ...', NULL) # 4 / usr / share / php / Zend / Gdata.php (187): Zend_Gdata_App-> getEntry ('http: // gdata.yo ... ',' Zend_Gdata_YouT ... ')' # 5 '/ usr / share / php / Zend / Gdata / YouTube.php (293): Zend_Gdata-> getEntry (' http: //gdata.yo ... ',' Zend_Gdata_YouT ... ')

I know this is a timeout. But what can cause this timeout? Since I do not mind having something to change in the connection settings of the server, and ping to gdata.youtube.com works fine.

In addition, I want to say that the systems do not work on the shared hosting platform, so the hoster does not do everything that he wants to do - I personally make changes to the system.

+4
source share
2 answers

On the server side of the YouTube API, nothing happens, which will result in the connection being completely refused by any client. Even if for some reason your client traffic violated the quota limit or was blocked due to protection from DoS (and I do not mean this case), we will still return a valid HTTP response to your request.

So, I can say with confidence that regardless of the problem, this is not related to the YouTube API server. The most likely culprit is a network problem somewhere between your server and the YouTube API. Standard network troubleshooting procedures are in order.

0
source

I fixed this by changing all google links in my loading script to be safe.

For example, I changed

http://uploads.gdata.youtube.com/feeds/api/users/default/uploads 

to

 https://uploads.gdata.youtube.com/feeds/api/users/default/uploads 
0
source

Source: https://habr.com/ru/post/1441920/


All Articles