[✗] Unable to update status of adlist with ID 11 in database /etc/pihole/gravi ty.db_temp
Error: unable to open database "/etc/pihole/gravity.db_temp": unable to open d atabase file
[✓] Cleaning up stray matter
[✗] DNS service is NOT running
Unable to complete update, please contact Pi-hole Support
pi@pi-hole4:~ $ sudo pihole -up
[✓] Update local cache of available packages
[✓] Building dependency package pihole-meta.deb
[✓] Installing Pi-hole dependency package
[i] Checking for updates...
[i] Pi-hole Core: up to date
[i] Web Interface: up to date
[i] FTL: up to date
If Pi-hole's DNS service was indeed down, then there may be information on how it went down in /var/log/pihole/FTL.log*, around the time of gravity update.
Your debug log looks normal, apart from authenticaton warnings occuring every 10 minutes, e.g.:
-rw-r----- 1 pihole pihole 6.4K Feb 2 11:50 /var/log/pihole/webserver.log
-----head of webserver.log------
[2025-02-02 00:00:24.058 GMT 202898] Authentication required, redirecting to /admin/login
[2025-02-02 00:10:22.937 GMT 202898] Authentication required, redirecting to /admin/login
[2025-02-02 00:20:22.782 GMT 202898] Authentication required, redirecting to /admin/login
[2025-02-02 00:30:23.062 GMT 202898] Authentication required, redirecting to /admin/login
Since you seem to run two Pi-holes, are you perhaps running some third-party sync software for Pi-hole that isn't providing correct authentication when making calls to Pi-hole's v6 API?
And would that third-party software perhaps force a restart of Pi-hole (which may indeed down pihole-FTL, if only for a very short period)?
This is an error from sqlite3 that can be triggered by all sorts of database file issues, e.g.,
given database file is actually a directory
path too long (only an issue on Windows)
parsing a relative path failed (also only an issue on Windows)
target is a symlink
issues with the journal files
Actually the last point has a whole multitude of ways to fail. What can trigger this is a preceding somehow failed database action that left the WAL in a dirty state.
Could you check your disk/SD card for errors/bad blocks? See here for a rather complete reference list on what you need
I was having a similar issue when I updated from v5 to v6 yesterday - but only on 1 of my 2 piholes. I did a whole bunch of testing with the lists - and it appeared to be an issue around 2 million domains (not unique) - and when my pihole was allocated 512MB of RAM. Updating it to 1GB or 2GB of RAM and it was successful. Happy to open a new issue if we think it's unrelated
Yes, this is unrelated and sorry for the long delay in replying. I had seen your post last week but then other things came in my way and I forgot about it again...
The issue here is that we build a very largeB-tree for being able to search within the 2 million in light speed. Iterating over each of the 2 million domains for each and every query processed by your Pi-hole would consume way too much time. Unfortunately, building this tree can only very limited been done in parts so a substantial amount of memory is needed for this task. 512 MB is just not enough. We also cannot really change the algorithm in any way to do this with less memory. What we can do is making the error message clearer in suggesting that this may be a memory issue: