Pihole V6 fresh instances are deleting the logs every 2 days

I first thought I was going crazy, these are fresh install from scratch, primary and secondary Pihole V6 + Unbound instances. The previous ones were upgrade from V5 which worked amazingly well.

The logs are just disappearing making impossible to see the network traffic to block/allow stuff as needed.

It is deleting anything older than 2 days even tho database.maxDBdays=91

I tried to look around, check pihole.tom or pihole.log which confirms no older log than 2 days which is insane, but there is no much I can find to stop this mess from happening.

I crossed a post saying that there is a bug with V6 and that I should have database.DBimport enabled which it is.

I checked the official documentation, I could not find a “here, there are all the parameters you can use” like with V5 I could use parameters such as:

DNS_FQDN_REQUIRED=true
DNS_BOGUS_PRIV=true
DNSMASQ_LISTENING=local
TEMPERATUREUNIT=C
BLOCKING_ENABLED=true
PIHOLE_DNS_1=127.0.0.1#5335

With V6, it feels like the “power” to change things was taken away, the official documentation no longer reflects V6 way of doing things or I am very blind.

Thank you

I reviewed everything again, did I restart DNS and just like that everything disappeared.

idk wtf is going and right now I am being forced to shut them down, and bring the old ones running from a server a wanted to decommission back online coz the way things are is insane.

I did a flush log and network table hopping this will clean whatever is broken.

After flushing the logs and the network table, everything is broken now.

Clients list is empty, logs are empty.
I can see the pihole -t processing data and the internet works fine but something is broken.
I will try to run the repair and hope that fix it.

Nope, everything is truly broken now, top clients, top domains no longer shows any data.

I am hopping a developer can assist me with this.

Thank you

This is my debug token: https://tricorder.pi-hole.net/GPj9JJR2/

Thank you very much.

Something very wrong is going on with Pihole V6, I have installed Pihole V5 countless time and never had half of the headache Pihole V6 is giving
I am using the secondary server to see wtf is going on:

  1. Backup
  2. Perform a clean install
  3. Restore the backup
  4. It crashes, DNS works but the dashboard is kill

Repeat the process again with smaller change:

  1. Clean install
  2. Do not restore the full backup, lists and domains only
  3. Unfortunatelly, V6 no longer has a dedicated file for the local DNS so you must edit pihole.tom to add them, meaning, if you are doing a restore and the configuration might be the problem, you have to manually edit that file. It just makes no sense at all.

Everything is working, the dashboard is working again but if I hit flush logs, pihole -t freezes and the dashboard no longer shows activity.

I had to restart the service for the dashboard to start showing again.

sudo service pihole-FTL stop
sudo service pihole-FTL start

Fixing the logs permissions didn’t fix that btw

chmod 644 pihole.log*

I have been running Debian since forever, with these new servers tho I am trying Denuvan which is Debian without systemd so idk if Pihole is having a hard time dealing with that.

I found the issue why the dashboard was kill, somehow this was added to the config file:

    excludeClients = [
      "^",
      "$"
    ] ### CHANGED, default = []

Deleting that automatically shows the dashboard that disappeared on its own.
I swear, I have not changed that even tho it says CHANGED.

This still didn’t solve the problem why the logs are self cleaning every two days which is the reason why I am asking for help until things went sideways.

I will be back in two days!!

pihole.toml contains those parameters.
It is fully documented, and beyond editing it, there are quite a few ways to change configurations options, as detailed in Introducing Pi-hole v6 :


You'd had the choice to manually edit files in either case.
With Pi-hole 5, there have been two files to edit, one for A/AAAA and for CNAME records, whereas you only have to edit one file (pihole.toml) in Pi-hole 6.

And just as Pi-hole 5, Pi-hole's UI has a panel for changing Local DNS records, via Settings | Local DNS records.

That could suggest that your teleporter backup contains those exclusions.
You could check your backup file yourself, or upload it and provide the token for us to take a look:

cat /path/to/pi-hole-teleporter_JJJJ-MM-TT_hh-mm-ss.tar.gz | sudo pihole tricorder

where you substitute /path/to/pi-hole-teleporter_JJJJ-MM-TT_hh-mm-ss.tar.gz with your actual teleporter file as appropriate.

It has NOT been 2 days yet but I am still checking things around.
I redeployed the primary VM with Debian instead of Denuvan suspecting Pihole is not compatible with non-systemd system.

The log truncate is no longer working!

/admin/settings/system > Flush logs is killing the dashboard.

I must restart the service or the Total Queries and Client Activities no longer shows data, nothing at all.

Only after restarting the service, everything gets back to normal.

sudo service pihole-FTL stop
sudo service pihole-FTL start

Again, I was running V5 before and then the upgrade to V6.
This time I am installing V6 from scratch, clean, without any left over from V5 and that is when things are going sideways.

I will reply back on Monday, that will be plenty of time for the primary(Debian 13) and the secondary (Denuvan) Pihole VMs to do its thing and truncate the log on their own.

After a few days with a V6 fresh install, there is something indeed very wrong with its logs.

It is only holding data up to 2 days only and if I flush the logs, that kills the dashboards.
I must restart the service, otherwise, the dashboards are a kill

sudo service pihole-FTL stop
sudo service pihole-FTL start

Again, these are fresh V6 install, the other/older instances I had were V5 upgrade to V6 and everything worked fine so this is a V6 problem.

Thanks for any advise.

How do you establish that logs are holding data for just two days?

Please provide fresh debug tokens.

The dashboard only shows data up to two days.
Anything older is like pihole.log.2.gz, pihole.log.2.gz within /var/log/pihole

It seems like I was looking at it wrong?!?!
I can live with that but it would be awesome if I can increase that to a week, these are VMs with enough resources.

So I guess this is solved (?!), the only real issue left is having to restart Pihole every time I flush the logs because the dashboards can no longer read the data from the new log. Changing permission to 644 like some old posts suggested didn’t work.

Not the end of the world as long as I don’t flush the logs via the browser, annoying asf but well.

I will open another topic for this.

Thank you Bucking

Yes.
You are mixing things. Log files and the database are different things within Pi-hole.

The option database.maxDBdays=91 is related to how long Pi-hole database will store queries. Database information is shown on the Query Log page and on the Dashboard (graphics, top clients, top domains, etc).

The logs in /var/log/pihole are text logs that you can read using pihole -t, but they are not directly used by the query log page or dashboard.
Also, these logs were always rotated. This didn't change from v5 to v6.


Apparently your initial issue was related to the regex filters removing everything from the dashboard. This is not a Pi-hole issue. It was just a configuration issue.

The "dashboard not showing entries older than 2 days" issue is very strange.
No other user complained about a similar thing.

Your previous token expired.
If you still need help, please provide a new debug token (here or in a new topic).

Quite the opposite.

Now you have the power to change any option via the web interface or editing the config file (/etc/pihole/pihole/toml). This wasn't possible with Pi-hole v5.
You can also use the new pihole-FTL --config command to change all Pi-hole options.
After any config change, Pi-hole will automatically restart if needed.

The documentation can be found directly in pihole.toml file:

The same information can be found on the web interface Settings > All settings page:

Quite probably - the dashboard shows activity of the last 24 hours.
It would always be populated with data, even after a restart, unless the long-term database would have been deleted.
This hasn't changed with Pi-hole versions.

With V5, I could flush the logs and the dashboard would start showing me new requests right away.

With V6 fresh install, flushing the logs means the dashboard is kill, no new data is shown unless I manually restart Pihole like it cannot read the data even tho Pihole is filtering/working normally.

I have seen similar behaviour with Linux server I used to manage where the application could not process the log after the file was truncated.

There are two ways of doing it:

  1. The current file is renamed and a new one is created which I believe it is what is happening here. The process gets lost and doesn’t know where to look for.
  2. The current file is kept as it is and its content is moved over to the “backup” file.
    This was the solution I had to apply so the process wouldn’t get lost unable to read the log file.

It is weird coz like I mentioned before, V5 upgrade to V6 didn’t have this issue, I have used flush logs and network table countless times after the upgrade to V6 and it always worked.
This is only happening with a fresh V6 install.

Not the end of the world but something is not right.

It is happening with both Debian 13 and Denuvan.
I ran Pihole on Debian since Debian 10 IIRC so I know this is not a Debian thing, now I have two system with the same behaviour.
If I boot the old instances that are V5 upgrade to V6 running on Debian 11, it all works fine.

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