-1

Sorry if this has been answered before, I've scanned through the forums and didn't find anything that could provide me with an answer.

In my scenario I have an ASP.Net site hosted in IIS 8.5 (according to the IIS Manager). The site currently hosted on an internal testing server. All the functionality works correctly and I have no issues with it bar some improvements as is usual. However, I've noticed that if I were to let the site idle for a short while, about 2-3 minutes, it would take very long to respond once the user would resume activity, usually longer than 20 seconds. As you might guess this breaks the user flow and can make the site unpleasant to use.

At first I thought it was my sessions clearing or dropping but I've since adjusted those and the problem still persists. I've investigated the problem with both Fiddler as well as Internet Explorer and Google Chrome's developer tools, and noticed that each time the website takes a long time to respond the process that takes the bulk of the time is the DNS Lookup (usually about 18 seconds). In order to continue my testing I've changed the host-name in my URL (for example "http://myapp/frmHome.aspx") to use the IP Address ("http://192.168.1.1/frmHome.aspx") and this immediately solves the problem. However, this would make navigating to the deployed website somewhat more difficult as its not a name the users can easily remember.

Does anyone have any advice that can help me solve this problem, or another tool that I can use to narrow it down?

Thanks!

1 Answer 1

1

Possibly try to fix your DNS entries.

~20sec is pretty close to the DNS timeout in some Operation Systems.

So it could be that the first DNS resolver might not be working correctly and after beeing too long "idle" cache could be emptied.

13
  • That's my first guess too. Also look at the DNS cache expiration time. 2-3 minutes of idling is usually not long enough for the DNS cache to get flushed (5 minutes is pretty standard).
    – Tonny
    Jul 9, 2015 at 13:49
  • Thanks for the answer, but can you give a bit more detail? As far as I know I don't have a DNS Server on the machine hosting the application. Could that be the problem? @Tonny: I've actually timed it. The DNS lookup slows after 2 minutes of being idle
    – GertV
    Jul 9, 2015 at 13:51
  • @GertV We are talking about the client side DNS here. Assuming the client is Windows is the delay immediately present after you issue an "ipconfig /flushdns" in a command-prompt ? This forces the local DNS cache to expire immediately. If that is the case DNS settings client-side are suspect. Either on the client itself or on the DNS server used by the client.
    – Tonny
    Jul 9, 2015 at 14:14
  • @Tonny: Did as you suggested. Left my application for 3 minutes and the DNS lookup took 8 seconds (verified with Google Chrome). After that I repeated the same process without waiting and it responded immediately. I've flushed the DNS, and it still responded immediately. Left it for 3 minutes and the DNS Lookup took 8 seconds. Verified this twice. Interestingly: if I were to ping the server with command prompt by using the computer name it will also take long to give results, but if I ping the IP I get results immediately
    – GertV
    Jul 9, 2015 at 14:44
  • 1
    If you add the site to your local hosts file does the problem go away? If so it is a DNS issue, I'd trace why the FQDN is not working. How long does it take to if you do nslookup myapp? Does going to FQDN work (myapp.domain.com or whatever the full name is)? Jul 9, 2015 at 15:28

Not the answer you're looking for? Browse other questions tagged .