Recently we worked on several IE hang cases which have similar symptoms, let me share our finding and solution.
Symptoms
========
Internet Explorer hangs for minutes before web page can be displayed.
It happens on several internet web sites.
No issue if IE set proxy server directly instead of proxy Pac file
Troubleshooting
=========
We collected network monitor trace and found it was doing lots of IPv6 DNS query before send http request out, see below.
In the netmon, it shows it has been taking over 10 seconds for query AAAA (IPv6) DNS record
141 09:36:43.5273510 100.100.100.220 100.100.100.63 DNS DNS:QueryId = 0xB36E, QUERY (Standard query), Query for www.xxx.com of type AAAA on class Internet
142 09:36:43.5634410 100.100.100.220 100.100.100.63 DNS DNS:QueryId = 0xB36E, QUERY (Standard query), Query for www.xxx.com of type AAAA on class Internet
143 09:36:43.6102870 100.100.100.220 100.100.100.63 DNS DNS:QueryId = 0xB36E, QUERY (Standard query), Query for www.xxx.com of type AAAA on class Internet
144 09:36:59.2616600 100.100.100.63 100.100.100.220 DNS DNS:QueryId = 0xB36E, QUERY (Standard query), Response - Server failure
…
205 09:36:47.6441450 100.100.100.220 100.100.100.63 DNS DNS:QueryId = 0xA737, QUERY (Standard query), Query for www.xxx.com of type AAAA on class Internet
206 09:36:47.7037970 100.100.100.220 100.100.100.63 DNS DNS:QueryId = 0xA737, QUERY (Standard query), Query for www.xxx.com of type AAAA on class Internet
207 09:36:47.7661270 100.100.100.220 100.100.100.63 DNS DNS:QueryId = 0xA737, QUERY (Standard query), Query for www.xxx.com of type AAAA on class Internet
610 09:36:59.2614460 100.100.100.63 100.100.100.220 DNS DNS:QueryId = 0xA737, QUERY (Standard query), Response - Server failure
In PAC file, there are many "IsInNET" checking. Then, IE will ask DNS client to resolve the ip address of the URL. This behavior will send IPv4 and IPv6 query to DNS.
//For Example:
//IP Range
if (isInNet(host, "200.100.100.1", "255.255.0.0")) { return proxy_no; }
if (isInNet(host, "200.100.100.2", "255.255.0.0")) { return proxy_no; }
if (isInNet(host, "200.100.100.3", "255.255.255.0")) { return proxy_no; }
if (isInNet(host, "200.100.100.4", "255.255.255.0")) { return proxy_no; }
if (isInNet(host, "200.100.100.5", "255.255.240.0")) { return proxy_no; }
if (isInNet(host, "200.100.100.6", "255.255.240.0")) { return proxy_no; }
if (isInNet(host, "200.100.100.7", "255.255.224.0")) { return proxy_no; }
if (isInNet(host, "200.100.100.8", "255.255.240.0")) { return proxy_no; }
In above netmon, the DNS return "Server Failure" in 10~20 seconds for each IPv6 query.
Internet Explore memory dumps were captured when reproduced the issue.
The dumps also show that thread is blocked waiting for threads that are in turn waiting for a name resolution call to return.
Solution
=======
There are 3 ways to resolve this issue.
a. DNS
The slowness happens due to IPv6 DNS record query slow for www.xxx.com web site as this site doesn’t have corresponding IPv6 address.
Add corresponding IPv6 mapping for web site in DNS server.
Proxy.Pac
KB315810 documents slow browsing with isInNet functions in the .pac file:
http://support.microsoft.com/kb/315810
Browser Is Slow to Respond When You Use an Automatic Configuration Script
Modify pac file to use the dnsResolve function and save the resolved IP address to a variable and pass this across to the isInNet function calls.
dnsResolve()
Resolves hostnames to an IP address. This function can be used to reduce the number of DNS lookups, e.g. below example.
var resolved_ip = dnsResolve(host);
if (isInNet(resolved_ip, "200.100.100.1", "255.255.0.0")) { return proxy_no; }
if (isInNet(resolved_ip, "200.100.100.2", "255.255.0.0")) { return proxy_no; }
if (isInNet(resolved_ip, "200.100.100.3", "255.255.255.0")) { return proxy_no; }
if (isInNet(resolved_ip, "200.100.100.4", "255.255.255.0")) { return proxy_no; }
if (isInNet(resolved_ip, "200.100.100.5", "255.255.240.0")) { return proxy_no; }
if (isInNet(resolved_ip, "200.100.100.6", "255.255.240.0")) { return proxy_no; }
if (isInNet(resolved_ip, "200.100.100.7", "255.255.224.0")) { return proxy_no; }
if (isInNet(resolved_ip, "200.100.100.8", "255.255.240.0")) { return proxy_no; }
c. (Not Recommended) Disable IPv6
How to disable IP version 6 (IPv6) or its specific components in Windows 7, in Windows Vista, in Windows Server 2008 R2, and in Windows Server 2008
http://support.microsoft.com/kb/929852/en-us
How to install and uninstall IPv6 in Windows XP
http://support.microsoft.com/kb/2478747
Regards,
Anik From APGC DSI Team