PiHole full disk causing mayhem
2025-11-10I’ve been struggling with slow DNS and long load times. After a lot of back and forth it turns out, it was DNS. Replugging everything in the server didn’t help, restarting switches, routers etc. didn’t help.
So somehow, the pihole FTL DB at /etc/pihole/pihole-FTL.db seems to only grow and
never shrink. There are settings to limit the number of days entries are kept in
the DB but the file still just keeps on getting bigger.
Once there is no disk space left, the pihole-FTL process starts consuming 100% CPU
and DNS queries start to time out even though everything else is working just fine.
My solution to prevent this from happening, is a small crontab entry to call
sqlite’s VACUUM command, which cleans up all the garbage that has been deleted
from the db but is still in the file.
|
|
Update - 2 days later
It became clear pretty quickly, that the above wasn’t really the solution. The
situation did improve a little, but not by much. I shouldn’t be running out of
disk space anymore, but pihole-FTL was still hogging CPU so I tried a few more things:
First, I deleted the FTL db altogether, restarted pihole and still… better but far from good.
Then, I also tried updating pihole again, using the update script (my pihole was
set up using the incredible tteck scripts for Proxmox). I noticed, that my pihole
was still using the old url, so i switched the update script to the new one and
ran update again - the only difference now was, that a few system packages were
updated. Acoording to dpkg.log these were:
- openssl
- libxslt1
- bind9-libs
- bind9-dnsutils
- bind9-host
- libssl3t64
This did actually improve the situation to a degree. As I keep an eye on my pihole
container using the command below. Now I only see intermittent phases, where the
pihole-FTL process uses 100% CPU. But during these moments, all internet browsing
basically crawls to a halt as the browser struggles to resolve hostnames (websites
today really overdo it with calling a million different services and sites, no
wonder my poor pihole has a hard time 😉 ).
|
|
output after 24ish hours of uptime:
|
|
I just noticed disk usage has gone up from 68% so about 120MB in just 24hrs of mostly idling and maybe some iot stuff querying the dns. I think somehow, that’s a lot…
Update - another month later
Things were fine for a while and then it started acting up again. Still no clue as to why this happens.
There was an update to FTL 6.4.1 (which is apparently the same as 6.4) and in the release notes, there’s fix for some intermittent high cpu usage although in my case it was permanent. Anyway, for the moment, things have settled down again.
https://github.com/pi-hole/FTL/releases/tag/v6.4.1
The interesting bits are these Two changes:
- Reduce DNS resolver locking during database interaction
- Reduce database locking and add timing debug setting
Let’s hope that was it or else I’ll be switching to another DNS - I’ve wasted too much time chasing this issue already.
Update - end of 2025
I switched to blocky - pihole kept freezing and I’ve had enough of it. There’s somehow still some weird timeouts every now and then and there’s a bunch of components that could be causing this. From the firewall (unifi seems to break and restore shelly connectivity every other update, which is a whole other insane nuisance), to the upstream DNS server and everything in between - oh joy!
At least it’s almost tolerable now.