Behavior when database is busy

installed

Current Pi-hole version is development v5.3.1-100-g98867d8d
Current AdminLTE version is tweak/blocking_while_busy v5.5.1-58-gb4a26d3
Current FTL version is tweak/blocking_while_busy vDev-2edd512

testing may take a while...

I've run pihole -g like twenty times now, the text 'gravity database is not available' doesn't appear in the log file anymore...

DROP.zip (40.1 KB)

to ensure something needed to be dropped, I ran

#!/bin/bash

domains=("userlocation.googleapis.com." "ssl.google-analytics.com." "incoming.telemetry.mozilla.org." "settings-win.data.microsoft.com.")

# initialize RANDOM only once, to avoid using the same entry evry time
RANDOM=$$$(date +%s)

while :; do
	selecteddomain=${domains[ $RANDOM % ${#domains[@]} ]}
	dig @192.168.2.57 A ${selecteddomain}
	sleep 5
done

on another pi

Although I didn't get a notification from this topic, I ran pihole -up this morning and got an update.

Current Pi-hole version is development v5.3.1-100-g98867d8d
Current AdminLTE version is tweak/blocking_while_busy v5.5.1-58-gb4a26d3
Current FTL version is tweak/blocking_while_busy vDev-6c6188f

after running the update, I checked for status type 15, and yes, their back 69 entries after the new FTL became active, 15 unique domains

DEBUG_QUERIES and DEBUG_FLAGS aren't active anymore (space on TMPFS is limited)

In the pihole-FTL log, I found (41 times):

[2021-08-20 09:09:57.387 9764M] Gravity database is busy (whitelist)
[2021-08-20 09:09:57.388 9764M] Gravity database is busy (blacklist)

and (90 matches)

[2021-08-20 09:11:40.007 9764M] ERROR: Gravity database not available
[2021-08-20 09:11:40.007 9764M] get_client_groupids("192.168.2.228") - SQL error step: database is locked

I assume this is normal, some FTL thread is still trying to acces the database.

I'm NOT sure how you determine what you consider to be a client initiated resubmitted query, and thus a normal situation. Could you please explain what to look for, to identify duplicates (that shouldn't happen) and resubmitted (that is normal)?

Will you be inviting additional testers, possibly make this part of dev?

Thanks, again, for your time and effort.

This can only be seen when you have DEBUG_QUERIES enabled. Each query for which a line like

exists is a new query. These lines are triggered by the code that receives DNS packets at the socket. If there were duplicates in the Query Log/database where no corresponding line in pihole-FTL.log exists - then those would be erroneous. I haven't seen anything indicative for something like this in your data, so far.

Sure, I'll open a PR soon(ish).

This was just a minor tweak to DNS cache debug logging. No change at all when DEBUG_QUERIES is not enabled.

The feature has been merged into the FTL v5.9 beta branch and will be included in the next Pi-hole release.

is there a branche (like pihole checkout dev) that has all the latest (core, web, ftl) on board, or do I have to get them induvidually?

Yes, because

is just a shortcut to get all the development branches. We don't have something similar for beta branches (with or without heterogeneous versions).

Except on docker where we have the :beta-v5.9 tag which get's rebuilt nightly to try and keep up with beta development!

1 Like

Just to let you know, the results of this, after updating to

Pi-hole version is development v5.3.1-100-g98867d8d (Latest: v5.3.1)
AdminLTE version is release/v5.6 v5.5.1-65-g224f906 (Latest: v5.5.1)
FTL version is release/v5.9 vDev-9a53df6 (Latest: v5.8.1)

Thanks, this looks promising. We should make DROP the new default in a future Pi-hole release.

Word of warning (again), if you're going to make DROP the default.

Correct me if I'm wrong

  • on new deployed (from scratch) pihole, the pi will not be a client of pihole-FTL, all queries will be resolved by whatever was configured as the resolver during installation
  • on an existing pihole, that has been upgrade from pihole v4 or earlier, the pi will be a client of pihole-FTL, all queries will be submitted to pihole-FTL.

This implies as you can see in my screenshots (I've changed the behaviour to pre-v5, e.g. my pi is a pihole-FTL client), some queries from 127.0.0.1, during pihole -up / pihole -g are dropped.

Because the pi (127.0.0.1) almost immediatly retries, there isn't a detectable problem, but it does happen (DROP on the pi). I don't know how docker, a VM, or a slower pi (ZERO) will behave. I'm running things on a 3B.

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