Solved

Trace DNS query and lookup time

Posted on 2011-03-01
4
643 Views
Last Modified: 2012-05-11
I am experiencing problems with 1 web site, it appears to be a DNS problem. Sometimes it takes 6-15 for the home page to open, after that it's super fast.

How can I trace DNS query, lookup time, etc, etc on Windows 7, Windows server running DNS service or linux box setup with ubuntu, or any other tool out there?

Thank you
0
Comment
Question by:Coffinated
  • 2
4 Comments
 
LVL 20

Accepted Solution

by:
brwwiggins earned 250 total points
ID: 35012632
You can do a simple DIG or NSLOOKUP from a client and see if it is a DNS issue. If the DNS server returns the IP address immediately you can pretty much rule it out.

Is this a .NET app? Sometimes .NET apps run slow initially because they must be compiled if they are not resident in the app pool memory. There are ways you can pre-compile apps to avoid this delay.
0
 
LVL 5

Author Comment

by:Coffinated
ID: 35012726
It's a Joomla based website set up on fairly fast VPS. I did create a clone on much slower server and it opens instantly. not sure what the problem is, server load is low, ping very low, DNS was the last thing to check.
'dig' produced result almost instantly, I'll keep checking it when site loads slowly again.
0
 
LVL 5

Assisted Solution

by:group0
group0 earned 250 total points
ID: 35031846
It sounds like a nameserver being hit somewhere in the recursive lookup is not responding, so it has to wait for a timeout before using a secondary NS to continue the lookup.  Once the final record is in your local resolver's cache, it'll continue to be quick until the TTL expires.

To bypass any caching on the part of your local resolver, use:

dig +trace www.domain.com

This will do a fresh recursive lookup each time (although other DNS servers in the chain may still cache their results).  If it pauses during the output, you'll have a good idea of which set of nameservers is the problem.  Then you can do a manual dig against each one until you find out which one is failing, eg:

dig www.domain.com @ns1.domain.com
dig www.domain.com @ns2.domain.com
0
 
LVL 5

Author Comment

by:Coffinated
ID: 35158659
The problem was related to underlying hardware, it disappeared once VPS got moved to another host.
0

Featured Post

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup" or a blinking cursor with black screen. A loop for Auto repair will start but fix nothing.  You will be panic as there are no back…
You may have a outside contractor who comes in once a week or seasonal to do some work in your office but you only want to give him access to the programs and files he needs and keep privet all other documents and programs, can you do this on a loca…
This Micro Tutorial will teach you how to the overview of Microsoft Security Essentials. This is a free anti-virus software that guards your PC against viruses, spyware, worms, and other malicious software. This will be demonstrated using Windows…
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question