Not saving Data

Please follow the below template, it will help us to help you!

If you are Experiencing issues with a Pi-hole install that has non-standard elements (e.g you are using nginx instead of lighttpd, or there is some other aspect of your install that is customised) - please use the Community Help category.

Expected Behaviour:

Pihole queries data should be saved in the database and not be cleared on DNS restart
operating system: Raspberry Pi OS
hardware: Raspberry Pi 5

Actual Behaviour:

pihole loses data on DNS restart as if being only saved in RAM and not in the database
This is a fresh install on bare metal

Debug Token:

Your debug token is:

Your database is incomplete.

The initial (empty) database should be 80Kb, but yours is only 44Kb:

*** [ DIAGNOSING ]: Pi-hole FTL Query Database
-rw-rw-r-- 1 pihole pihole 44K May 18 19:25 /etc/pihole/pihole-FTL.db

To fix this, 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

After Pi-hole is restarted, check the database file size with ls -lh /etc/pihole/pihole-FTL.db.
The size should be at least 80Kb.

The database is now 80KB

I will update you later if that worked

This has worked, thank you for your help, I though a fresh install would have had the correct database but clearly not

It usually has, but in your system for some reason the installation script was not able to finish the database creation process and a few tables were missing.

would pihole be the cause of website loading slowly
since this system reinstall, some websites take a few minutes to load or never load at all
I changed a lot of things my pihole installation and added powerline adapters to the main network switch everything runs from, so its one of them but which one

Not if everything is correctly configured.

A network problem is a more likely cause.

It’s only certain domains and when I have to turn the router dhcp back on and ignore pihole for a few days, this did not happen, now with the pihole dhcp this is happening again

I appreciate your help very much but I do not have the base of knowledge to understand what to do . . .
Please advise as if you were talking to a 5th grader, as I don't know where to start typing. I am in Terminal with the prompt at /users %. Is that where we should be typing this into?

To fix my original problem with the database being corrupt

Go to terminal

Cd /etc/pihole
Sudo mv pihole-FTL.db pihole-FTL.db.bak
Sudo mv gravity.db gravity.db.bak
Pihole restartdns

That is the simplest I can explain it

Just a side note, this always annoys me, why add to my old post when you could make a new post