youtube.com  s.ytimg.com  hang problem solved

Problem:
youtube.com website doesn't load properly. It loads looking like this:

youtube.com s.ytimg.com hangs problem

On further analysis it's noted the web browser hangs for 20 seconds attempting to connect to s.ytimg.com:

youtube.com s.ytimg.com hangs problem


Cause:
Windows DNS service incorrectly resolves IP address for s.ytimg.com. It then tries to contact s.ytimg.com and gets no reply, after 20 seconds it times out with:

Windows Sockets Error Code 10060: WSAETIMEDOUT:

"A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond."

Afterwards the web page attempts to continue loading, but throws numerous errors starting with:

yt.setConfig is not a function


Firebug: youtube.com s.ytimg.com hangs problem


Solution:

  1. Remove entry for s.ytimg.com from Hosts file C:\Windows\System32\drivers\etc\hosts

    # Copyright (c) 1993-2006 Microsoft Corp.
    #
    # This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
    #
    # This file contains the mappings of IP addresses to host names. Each
    # entry should be kept on an individual line. The IP address should
    # be placed in the first column followed by the corresponding host name.
    # The IP address and the host name should be separated by at least one
    # space.
    #
    # Additionally, comments (such as these) may be inserted on individual
    # lines or following the machine name denoted by a '#' symbol.
    #
    # For example:
    #
    # 102.54.94.97 rhino.acme.com # source server
    # 38.25.63.10 x.acme.com # x client host

    127.0.0.1 localhost
    ::1 localhost
    74.125.162.39 static.cache.l.google.com s.ytimg.com   Delete this line

  2. Then clear your browser's DNS cache
    There are a few things you can try to accomplish this:

    • Exit and restart your browser

      If that doesn't work you can try:

    • Reboot your computer

      If that doesn't work you can try:

    • For Firefox you can install the DNS Cache add-on, then use it to clear your browser's cache. The DNS Cache icon will be the gear icon at the bottom:

      Firefox DNS Cache flush


Further:
I've no idea how this entry gets there. It will take further analysis to track that one down.


Other:
If the above hosts file isn't the problem, you can also try clearing the computer's DNS cache via:
Start → Run → ipconfig /flushdns
flush DNS cache




Footnotes:
[1] I'm guessing ytimg.com stands for "YouTube Images"




Back to DELEY'S Home Page


Last Update: June 6, 2016