Firefox sporadically loses ability to perform DNS lookups

I've scoured the web for several days now, essentially every single time I encounter this. I hope someone here knows a solution to this.

Facts

  • I'm using the latest stable release of Firefox at the time of writing.
  • I'm running on Dual Stack (native IPv4 and native IPv6).
  • Any tab exhibits the symptom as soon as you refresh or open a new URL.
  • No other browser or client is affected. I can use Opera, Internet Explorer, PuTTY etc without any such symptoms while Firefox continues to show me "Server not found".
  • NB: The DNS cache service on my box is turned off (meaning ipconfig /flushdns is out of the picture).

This remains unsolved as of July 2016. I still experience the DNS "outages" which seem to affect only Firefox.

Symptoms

I recently switched to Firefox and I am experiencing "Server not found" errors in intervals from less than an hour to several days.

enter image description here

This happens out of the blue, except that when I disconnect Cisco AnyConnect, this seems to be a sure-shot way of exposing this behavior. The issue, however, also occurs sporadically without any VPN software even running.

Stuff I researched and tried

I tried F5 obviously, but that never worked. The only thing that works reliably is to restart Firefox. Personally, that would mean I would have to switch browser again, as this behavior is simply unacceptable.

I found this several year old thread which suggests turning off IPv6, which is also recommended over at mozillaZine. In fact this prompted me several days ago to turn both IPv6 and DNS prefetching off by setting the following options in about:config:

network.dns.disableIPv6=true
network.dns.disablePrefetch=true

Yet I have seen the symptoms again in the days since the configuration change (I have since reset those two options).

Now what I found flabbergasting was that when I looked at the outgoing requests from my machine using Wireshark while attempting to refresh the tabs that showed those symptoms, I saw not a single DNS request: zero, nada. What I saw instead were NBNS requests, i.e. "NetBIOS Name Service". And in fact the requests contained the very names of domains I was trying to access from Firefox.

Please note that after restarting Firefox, I can see these NBNS requests also for cases were a standard DNS lookup fails (not the "connection", but the lookup fails, I can see DNS responses). That is wpad for example fails to resolve via DNS in the intranet and then internet and then ends up as an attempt via NBNS.

Question

How can I either prevent this from happening in the first place or when it happens recover from it without having to restart Firefox? This being: Firefox losing its ability to resolve server names via DNS.


A couple of months ago I had exactly the same problem with Firefox. Same symptoms, only Firefox stopped to resolve addresses... opera, chrome, ie, etc. all worked like a charm, I restarted Firefox and all working fine but just a few minutes. As far as I know, the only difference with you is that I was using Firefox Portable from portableapps.com. I reinstalled it a lot of times and tried all that you can imagine but I get nothing so I switched to Portable version of Firefox ESR (Extended Support Release) and with this version I had zero issues but it is an old version (31.7).

Well, two weeks ago I decided to try it again with last Firefox Portable version 38.0.5 and the same problem... but this time I found a Firefox profile in %APPDATA%\Mozilla\Firefox\Profiles so I removed it (Firefox should be stopped) and that's all, for some reason I can't explain, that profile was causing the DNS issues, since then, zero issues with last Firefox Portable version.

It is something you could try to check, maybe you have some corrupt profile that is causing some conflict, you could try to delete the profiles and Firefox will create a new one in the next start, but please, before delete anything, backup backup backup ;).

Sorry, I know this is not an answer but I can't add a comment.


I found it was only the cert8.db file that required deleting from the profile folder to resolve the issue for me which is a lot less drastic than deleting your entire profile.
I would notice that a specific site with a self signed certificate would take longer and longer to load over a period of days and weeks until eventually I'd get nothing except the "Server not found" message. Now my solution is

Close Firefox
Navigate to %APPDATA%\Mozilla\Firefox\Profiles
Delete cert8.db file
Restart Firefox