Cached DNS Queries

The issue I am facing:
My Pi-hole has an excessive amount of Cached DNS Queries to the point where my pi-hole is not usable. I believe it is causing everything to either go excessively slow or not load at all.

Details about my system:
Raspberry Pi 4b

What I have changed since installing Pi-hole:
Upgraded from version 5 to 6.

@Bucking_Horn Can you please take a look?

Please upload a debug log and post just the token URL that is generated after the log is uploaded by running the following command from the Pi-hole host terminal:

pihole -d

or if you run your Pi-hole as a Docker container:

docker exec -it <pihole-container-name-or-id> pihole -d

where you substitute <pihole-container-name-or-id> as required.

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

@jfb @Bucking_Horn Here is the Debug

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

Your query database is quite large:

*** [ DIAGNOSING ]: Pi-hole FTL Query Database
-rw-r----- 1 pihole pihole 3.0G May  9 09:56 /etc/pihole/pihole-FTL.db

Run these commands to move the existing database to a new file name and create a fresh database.

sudo service pihole-FTL stop

sudo mv /etc/pihole/pihole-FTL.db /etc/pihole/pihole-FTL-old.db

sudo service pihole-FTL start
1 Like

This helps. Thank you! Should I run these commands whenever the Cache gets large?

These commands have no effect on your cache. What you have done is shrink the size of your query database. Very large databases (particularly those with some corrupted entries) cause performance problems in V6.

Shrinking the database eliminates this performance problem. The database will grown in size daily until you reach the duration limit, which is 91 days by default in V6. You have the option of changing this parameter. The previous default in V5 was 365. All else being equal, your new database will be about 25% the size of the previous database after the 91st day.

You query cache is maintained in memory. Queries enter the cache as they are generated. The length of time each entry remains in cache is tied to the TTL (time to live) of that domain. When the TTL expires, the cache naturally exits the cache.

The default cache size in Pi-hole is 10,000 entries, which is more than sufficient for almost all users. It is rare tha the cache size needs to be increased.