[Interesting bug] video connection timeout

Source: Internet
Author: User

I recently encountered a bug, but its appearance has a probability, so it is quite interesting.

The bug is that during the video playing process (the playback progress <the loading progress), the buffer animation effect is first displayed, followed by the snowflake background and an exception "video connection timeout" is thrown ". Alternatively, the cached animation effect is first displayed, and the video is returned to play from the beginning.

The cause of the bug is that a server is unstable, resulting in video playback interruption. (That is, external reasons) (but can the size of the impact of external reasons on the service be optimized at the code level? Can be supplemented and considered)

For details ----

When we access a video website and open a video, we will perform the following steps:

[1] parsing XML files

[2] establish a connection with the video source

[3] Starting video playback

So the cause of this bug is in step [2]. Why is there a probability?

The video source of the website is stored on multiple servers, for example, flv.bn.youtube.com | flv4.bn.youtube.com | flv5.bn.youtube.com

The purpose of this is (1) not to affect the user's inability to watch the video because a server is broken. (2) it is to distribute the pressure on the server when users access the server,

At the same time, the programmer configures the probability of being accessed by FLV, flv4, and flv5 in the code in advance,

Therefore, users sometimes obtain video sources from flv.bn.youtube.com, sometimes from flv4.bn.youtube.com, or from flv5.bn.youtube.com,

When a user creates a request with an unstable server (that is, watching videos on an unstable server, for example, if flv.bn.youtube.com is unstable today ), this bug will occur. Although there are some differences in the form of Bug, it is affected by factors such as the network environment and server configuration.

[16:22:27] youtubeplayer XX. xxxx
[16:22:27] chrome ooooo
[16:22:27] Win ooooo
[16:22:27] Sid: XXXXX
[16:22:27] vid: ooooo
[16:22:27] topicid: XXXXX
[16:22:27] pltype: ooooo
[16:22:27] iplimit: XXXXX
[16:22:27] videoadv: http://xxx.ooo.xxx.ooo.xml
[16:22:29] _ M: 1, _ B: 0

[16:22:29] ns. Play (http://flv.bn.youtube.com/xxxxx.flv)
[16:22:29] false | netstream. Play. Start
[16:22:29] duration: 437.24
[16:22:30] ns. Play (http://flv.bn.youtube.com/xxxxx.flv)
[16:22:30] True | netstream. Play. Start
[16:22:30] ns. Play (http://flv.bn.youtube.com/xxxxx.flv? Start = 2129 & End = 33031317)
[16:22:30] True | netstream. Play. Start
[16:22:31] True | netstream. Video. dimensionchange
[16:22:31] True | netstream. Buffer. Full
[16:22:46] True | netstream. Buffer. Flush
[16:22:48] True | netstream. Play. Stop

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.