Some sites take forever to load when using Pi-hole...and sometimes when not using it?

Hi - I have been having this problem for a while now, and I think it is being caused by pi-hole. But i'm really not sure.

Every once in a while (read: completely randomly), it will take FOREVER to load a webpage. Sometimes one I visit every day, sometimes a brand new one.

What I mean by this is I will type in a web address, hit enter, and the browser will just say "waiting..." in the status bar in the bottom left...for almost 2 MINUTES sometimes! and then finally load the entire site in a flash. E.g. blank page for 30s to up to 2 minutes or even a time out....and then finally it makes the connection and loads the page quickly like my usual web browsing experience.

The problem started to seem like DNS resolution because in my previous experience when a page hesitates like that, it usually means the DNS request failed and it is waiting for NXDOMAIN but never receives it, or fails trying the second server or something. I don't understand DNS so forgive me. But you sort of get what I'm saying. I hope.

I couldn't tell why this is happening. At first I thought it may have to do with my wifi, but It happens on a wired connection too, so wifi theory was out. Then I started doing some network recordings with my web inspector in firefox and it was hinting the problem was DNS.

screenshot:

also ran this tool...raspberry pi (@ 10.10.2.24) was at bottom

SCR-20221213-42t

What is interesting is that I mostly have this problem within Firefox. I tried to access the same page in Chrome when this was occurring one time, and Chrome loaded the site rather instantly. Maybe a slight pause (0.5s) in DNS.

I have tried disabling DNS over HTTPS in Firefox, but results seem the same. I believe I also tried disabling uBlock/adblock & other extensions but results seemed the same. I will run these tests again.

What HAS changed on my network recently (last 6 months) was enabling of IPv6. I should probably disable it and run tests but it was so complicated to enable on my router that I don't want to do that right now...I will though and update this post. Just super late and wanted to get this out there for some initial feedback.

I saw the forum post that said there was issues with IPv6 and pi-hole...but only for versions <4.0. I am running

  • Pi-hole v5.13
  • FTL v5.18.2
  • Web Interface v5.16

on Raspberry Pi 3 Model B Rev 1.2 running Raspbian GNU/Linux 10 (buster)

Problem occurs on Mac and Windows and mobile devices.

I tried setting manual DNS to my router (10.10.2.1) to bypass Pihole...but sometimes it had the same long delay without using pihole too...I think...
The problem is so random and esoteric it's hard to document.
I'm just really confused. I was coming here with hopes someone could tell me where/how to start troubleshooting.

EDIT: I just realized I actually had IPv6 disabled on my Mac when the problem occurred, inspiring this post. If that's useful additional info. So it seems to occur whether I'm using IPv6 on my client machine or not.

edit: some more info from scutil --dns ...I think i've been using my ISP IPv6 resolver this whole time...Is that what this means? This is the IPv6 address of my pi.hole
DNS configuration (for scoped queries)

resolver #1
search domain[0] : ubnt.lan
nameserver[0] : 2600:1700:b2e:205f:25bb:40e:ff:7430
nameserver[1] : 10.10.2.24
nameserver[2] : 10.10.2.1
if_index : 14 (en0)
flags : Scoped, Request A records, Request AAAA records
reach : 0x00020002 (Reachable,Directly Reachable Address)

even though it's listed last?

and pihole is configured for cloudflare?

PIHOLE_DNS_1=1.1.1.1
PIHOLE_DNS_2=1.0.0.1
PIHOLE_DNS_3=2606:4700:4700::1111
PIHOLE_DNS_4=2606:4700:4700::1001
PIHOLE_DNS_5=10.10.2.1

And Windows devices don't even seem to be receiving IPv6 DNS info?

Expected Behaviour:

Page loads without delay / instantaneously

Actual Behaviour:

Connection to page takes forever to establish, up to two whole minutes sometimes, then page loads instantly thereafter or, in some cases, times out entirely.

Debug Token:

https://tricorder.pi-hole.net/44oEsipj/

This statement from your post title would tend to indicate that the problem is not with Pi-hole.

"and sometimes when not using it?"

In addition, you note that the problem is unique to a specific browser (Firefox). This reinforces that the problem is not likely with your Pi-hole, but with the browser.

The benchmark for DNS has no scale. If the difference is a few msec (or tens of msec) between the top and the bottom, you will never notice this in your daily browsing.

Your screen capture shows a lot of things blocked by uBlock. That may be part of your problem on that browser.

Check your Pi-hole query log, which will show you the reply time for each DNS query. I suspect you won't find any that are ridiculously slow.

I have Windows DNS Timeouts in windows when I asking nslookup to check a few sites in a loop.

I have this version.

Create a txt file add your sites that are slow to load then save.
Rename txt to bat.
For Windows.

@echo off
nslookup spclient.wg.spotify.com >> log.txt
echo spclient.wg.spotify.com >> log.txt
time /T | time >> log.txt
echo spclient.wg.spotify.com >> log.txt
nslookup gae2-spclient.spotify.com >> log.txt
echo gae2-spclient.spotify.com >> log.txt
time /T | time >> log.txt
nslookup apresolve.spotify.com >> log.txt
echo apresolve.spotify.com >> log.txt
time /T | time >> log.txt
nslookup audio4-fa.scdn.co >> log.txt
echo audio4-fa.scdn.co >> log.txt
time /T | time >> log.txt
nslookup www.yahoo.com >> log.txt
echo www.yahoo.com >> log.txt
time /T | time >> log.txt
nslookup v10.events.data.microsoft.com >> log.txt
echo v10.events.data.microsoft.com >> log.txt
time /T | time >> log.txt
spotdns.bat

For Linux and there is no timeouts.

nslookup spclient.wg.spotify.com 192.168.1.5 >> log.txt
echo spclient.wg.spotify.com >> log.txt
(time ls) >> ls_results 2>> log.txt
echo spclient.wg.spotify.com 192.168.1.5 >> log.txt
nslookup gae2-spclient.spotify.com 192.168.1.5 >> log.txt
echo gae2-spclient.spotify.com 192.168.1.5 >> log.txt
(time ls) >> ls_results 2>> log.txt
nslookup apresolve.spotify.com 192.168.1.5 >> log.txt
echo apresolve.spotify.com 192.168.1.5 >> log.txt
(time ls) >> ls_results 2>> log.txt
nslookup audio4-fa.scdn.co 192.168.1.5 >> log.txt
echo audio4-fa.scdn.co 192.168.1.5 >> log.txt
(time ls) >> ls_results 2>> log.txt
nslookup www.yahoo.com 192.168.1.5 >> log.txt
echo www.yahoo.com 192.168.1.5 >> log.txt
(time ls) >> ls_results 2>> log.txt
nslookup v10.events.data.microsoft.com 192.168.1.5 >> log.txt
echo v10.events.data.microsoft.com >> log.txt
(time ls) >> ls_results 2>> log.txt
./spotdns.sh

I have 3 piholes in series atm if that makes it any harder with a DNSMasq server as a front end.

Result of the log on nslookup on my windows 11 USB WIFI.

C:\Users\John Doe\Desktop>nslookup audio4-fa.scdn.co 
Server:  UnKnown
Address:  192.168.1.5

DNS request timed out.
    timeout was 2 seconds.
DNS request timed out.
    timeout was 2 seconds.
DNS request timed out.
    timeout was 2 seconds.
DNS request timed out.
    timeout was 2 seconds.

C:\Users\John Doe\Desktop>nslookup audio4-fa.scdn.co 
Server:  UnKnown
Address:  192.168.1.5

DNS request timed out.
    timeout was 2 seconds.
DNS request timed out.
    timeout was 2 seconds.
DNS request timed out.
    timeout was 2 seconds.
Name:    ipv4.scdnco.spotify.map.fastly.net
Address:  151.101.110.248
Aliases:  audio4-fa.scdn.co

@cantaloupe have you pinged you gateway IP for any length of time?

If its reply has trouble try this.
How to Fix High Ping in Games in Windows 11?

I also did most of the 8 ways.
8 Ways to Increase Network Speed via Regedit in Windows 10

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.