Unreliable and slow DNS resolution in firefox

Package Information

  • Package name: firefox
  • Package version: 124.0.1-r0
  • Alpine version: 3.20.0_alpha20240315
  • Alpine architecture: x86_64

Summary

DNS resolution in firefox is extremely slow when visiting sites (for example, fonts.googleapis.com took up to 6 seconds). It is also very common to get NS_ERROR_UNKNOWN_HOST when viewing Network tab in devtools, which is a DNS failure. As a result of those failures certain subdomains don't load and the website is missing stylesheets/js. Refreshing the page a few times resolves DNS issues if there were any.

The issue does not seem to apply to tools like nslookup or ping, which are able to resolve domain name almost instantly

I don't know if the same issue applies for chromium, needs further testing.

Steps to reproduce

  • Visit a site which wasn't visited in current session yet
  • Firefox might get stuck for about 2-5 seconds without anything being shown in the status line
  • DNS resolution may take longer than expected
  • Depending on your luck, you either get greeted with "Hmm. We’re having trouble finding that site." screen, or a site with partially loaded CSS. And if you're really lucky it will load on first try.