-2 Domains on Blocklist (after updating pihole)

Sometimes the dashboard just shows -2 domains on the blocklist.
Nevertheless, the blocklist seems to be active, because blocking works as expected.

I had updated pihole some hours before, but didn't notice the behavior right away.
The update log seems to have been cleared by DietPi in the meantime.

running pihole -g fixes that, but unfortunately this is not the first time I have noticed this.

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

The last time this happened to me was before my SD card became defective.

@DL6ER, I need your help to correct me if I'm wrong.

I think this happens when the gravityDB_count() function encounters a problem counting the number of blocked domains and returns the constant DB_FAILED (which has a value of -2). Then the javascript code receives this value and show it.

This should fix the issue:

Yes, the question here is - as so often - the Why?

Looking at @TheME's debug token, /var/log/pihole/FTL.log is completely empty which is really odd as the mentioned function gravityDB_count() does log errors on each possible way that leads to -2

This is probably because DietPi uses RAMlog and the logs are cleared every hour by default.
I have now changed the setting to store the logs on disk.

1 Like