Discrepancy among displayed domains vs real domains

Is this supposed to happen?
Running pihole -up shows 539260 unique domains, and after optimization the number drops to 505540 as shown below from console output.

On dashboard the number shows as 539260 domains!!!
image

Problem with Beta 5.0:
` [✓] Storing downloaded domains in new gravity database
[✓] Building tree
[✓] Swapping databases
[i] Number of gravity domains: 824355 (539260 unique domains)
[i] Number of exact blacklisted domains: 0
[i] Number of regex blacklist filters: 17
[i] Number of exact whitelisted domains: 25
[i] Number of regex whitelist filters: 0
[✓] Flushing DNS cache
[✓] Cleaning up stray matter

[✓] DNS service is running
[✓] Pi-hole blocking is Enabled

[i] The install log is located at: /etc/pihole/install.log
Update Complete!

Current Pi-hole version is v4.3.2-421-gb73580f
Current AdminLTE version is v4.3.2-426-gdd7b2b20
Current FTL version is vDev-61d67ff

Next optimize list

curl -sSl https://raw.githubusercontent.com/mmotti/pihole-gravity-optimise/master/gravityOptimise.py | /usr/bin/python3
[i] Root user detected
[i] Pi-hole path exists
[i] Updating gravity (this may take a little time)
[i] DB detected
[i] Fetching domains
[i] Connecting to /etc/pihole/gravity.db
[i] Querying DB for gravity domains
[i] --> 539262 domains found
[i] Scanning /etc/dnsmasq.d for wildcards
[i] --> No wildcards found
[i] Fetching regexps
[i] --> 17 regexps found
[i] Checking for gravity matches
[i] --> 33722 matches found in gravity
[i] Running deletions
[i] --> 505540 domains remain in the gravity database
[i] Restarting Pi-hole
`

Debug Token:
https://tricorder.pi-hole.net/12v2qkynuz

Best bet for a solution would be to ask the creator of the third-party optimizer why their script doesn't correctly update the database and Pi-hole FTL.

2 Likes

pihole restartdns reload-lists should be used instead of a full restart. This should be very quick.

1 Like

Tried pihole restartdns and pihole restartdns reload-lists. No change in behavior. I did clear browse cache before checking both times

Yes, see:

This means the optimization does not change the stored number of domains. This is incorrect behavior of the script, it should update the gravity_count value in the info table.

Thanks @DL6ER. I have raised this issue with developer mmotti. I am the first to raise issue on his repository at github so hope to hear soon

@DL6ER has there been an update recently introducing the gravity count field?

and updated with

2 Likes

Thanks @DanSchaper - much appreciated :slight_smile:

Edit:

@cleanev
This thread can be closed now - It has been resolved in the most recent commit.

2 Likes

Thanks @mmotti.
It works perfectly now.
Thanks @DanSchaper for specific links to help @mmotti