Pihole keeps hanging…

Recently revised my system to use the pihole as DHCP server and dns (obviously). System is running on a raspberry zero w (I suspect this is the issue). All devices now point to the pihole and everyone and then the internet seems to go down for those on web browsers. Streaming services do not stop (Xbox, Hulu, etc)

Expected Behaviour:

All devices to get ip addresses from pihole and no ads

Actual Behaviour:

System keeps hanging and going way over 1 for the load. Causes DNS resolving to fail and computers to think the internet isn’t working.

Debug Token:

https://tricorder.pi-hole.net/QWhw23FV/

Why do you suspect this is the issue? A Zero W is more than powerful enough to run Pi-hole, even on a busy network.

Your debug log shows that Pi-hole is working normally. Let's take a look at the recent activity to the Pi-hole. Please post the output of the following commands from the Pi terminal:

echo ">stats >quit" | nc localhost 4711

ls -lha /etc/pihole/*.db

ls -lha /var/log/pihole.log*

free -h

When you run htop, what processes are consuming the CPU?

Thank you for your reply. Good to know about the W. It had been fine until I told Pihole to be DHCP as well, that's why I was thinking it may be the problem.

echo ">stats >quit" | nc localhost 4711

Response is

domains_being_blocked 2869406
dns_queries_today 425161
ads_blocked_today 64669
ads_percentage_today 15.210473
unique_domains 5324
queries_forwarded 70714
queries_cached 289429
clients_ever_seen 51
unique_clients 35
dns_queries_all_types 425161
reply_NODATA 14302
reply_NXDOMAIN 3818
reply_CNAME 25780
reply_IP 146643
privacy_level 0
status enabled

For ls -lha /etc/pihole/*.db

-rw-rw-r-- 1 pihole pihole 221M Aug 29 17:20 /etc/pihole/gravity.db
-rw-r--r-- 1 pihole pihole 2.6M Jul 5 07:11 /etc/pihole/macvendor.db
-rw-r--r-- 1 pihole pihole 3.8G Aug 30 05:35 /etc/pihole/pihole-FTL.db

For ls -lha /var/log/pihole.log*

-rw-r--r-- 1 pihole pihole 1.3G Aug 30 00:00 /var/log/pihole.log
-rw-r--r-- 1 pihole pihole 1.7M Aug 29 00:00 /var/log/pihole.log.2.gz
-rw-r--r-- 1 pihole pihole 1.6M Aug 28 00:00 /var/log/pihole.log.3.gz
-rw-r--r-- 1 pihole pihole 1.6M Aug 27 00:00 /var/log/pihole.log.4.gz
-rw-r--r-- 1 pihole pihole 2.1M Aug 26 00:00 /var/log/pihole.log.5.gz
-rw-r--r-- 1 pihole pihole 1.5M Aug 25 00:00 /var/log/pihole.log.6.gz

free -h:

total used free shared buff/cache available
Mem: 433M 83M 43M 57M 306M 242M

On htop
Nothing seems to be consuming it at this pooint but it's not having the issue right now....

Thank you!

That pihole.log is enormously large, and large logs for Pi-hole are almost always caused by an excessive amount of DNS requests.

The most common reason for excessive DNS queries would be a DNS loop.
Another indication for such a loop is if your router shows up as Pi-hole's top client by far:

echo ">top-clients >quit" | nc localhost 4711

Your debug log shows you've enabled Conditional Forwarding.

That could close a partial DNS loop if your router would be configured for using your Pi-hole as its upstream DNS server.

Since Pi-hole is handling DHCP now, there is no need for asking your router for DHCP names of local devices via CF.

See if disabling CF is getting you back to normal levels of DNS activity.

Ah... Thank you that's helpful. Now my pi has a full drive. So full I can't use flush to clean it up. Ugh....

For a start, you could consider to delete Pi-hole's log files.
There's no harm in losing them - Pi-hole keeps record of queries past in its query database.

Of course, this would also mean that your query database would be huge by now.

If you don't mind also losing all of Pi-hole's long-term query history, you could delete Pi-hole's query database:

sudo service pihole-FTL stop
sudo rm /etc/pihole/pihole-FTL.db
sudo service pihole-FTL start

@David_West You should also consider to disable DNS logging. There is no downside to this else than that the data will be missing for possible debugging (which you may not need once the disk is free):

pihole logging off

The historical data will still be stored in the database (/etc/pihole/pihole-FTL.db).

That was it! Thank you. I had tried deleting the files using rm but that clearly didn't work fully.

Thank you so much!

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