Pihole stopped processing any traffic overnight

Hi. I’ve been running pihole for over a year now with no issues. For some reason, over night, it stopped processing anything and blocking ads. The interface shows almost zero requests for about 12 hours, and less than .8% ads blocked.

I haven’t changed any DNS settings (my Eero handles DCHP, as it always has).

Expected Behaviour:

Running on a raspberry pi with pihole being the only application in use.

Actual Behaviour:

No traffic/requests being processed by pihole. No ads blocked as a result.

Debug Token:

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

Your query database appears to be corrupted:

*** [ DIAGNOSING ]: contents of /var/log/pihole

-rw-r--r-- 1 pihole pihole 987K Nov 20 09:33 /var/log/pihole/FTL.log
   -----head of FTL.log------
   [2024-11-20 00:01:00.051 848/T865] SQLite3 message: file is not a database in "DELETE FROM network_addresses WHERE lastSeen < 1700550060;" (26)
   [2024-11-20 00:01:00.051 848/T865] ERROR: SQL query "DELETE FROM network_addresses WHERE lastSeen < 1700550060;" failed: file is not a database (SQLITE_NOTADB)
   [2024-11-20 00:02:00.039 848/T865] SQLite3 message: file is not a database in "DELETE FROM network_addresses WHERE lastSeen < 1700550120;" (26)
...

Run these commands to move the existing database to a new file name and create a fresh database.

sudo service pihole-FTL stop

sudo mv /etc/pihole/pihole-FTL.db /etc/pihole/pihole-FTL-old.db

sudo service pihole-FTL start

Additionally, your DHCP server (which appears to be your router) is not distributing the IP of your Pi-hole (listening on eth0) as a DNS server:

*** [ DIAGNOSING ]: Discovering active DHCP servers (takes 10 seconds)
   Scanning all your interfaces for DHCP servers
   Timeout: 10 seconds
   
   * Received 300 bytes from eth0:192.168.4.1
     Offered IP address: 192.168.4.64
     Server IP address: N/A
     Relay-agent IP address: N/A
     BOOTP server: (empty)
     BOOTP file: (empty)
     DHCP options:
      Message type: DHCPOFFER (2)
      server-identifier: 192.168.4.1
      lease-time: 14400 ( 4h )
      netmask: 255.255.252.0
      router: 192.168.4.1
      dns-server: 192.168.4.1
      broadcast: 192.168.7.255
      ntp-server: 192.168.4.1
         --- end of options ---
   
   
   * Received 300 bytes from wlan0:192.168.4.1
     DHCPOFFER hardware address did not match our own - ignoring packet (not for us)
     DHCPREQUEST chaddr: dc:a6:32:83:f4:1d (our MAC address)
     DHCPOFFER   chaddr: dc:a6:32:83:f4:1c (response MAC address)
   
   * Received 300 bytes from eth0:192.168.4.1
     DHCPOFFER hardware address did not match our own - ignoring packet (not for us)
     DHCPREQUEST chaddr: dc:a6:32:83:f4:1c (our MAC address)
     DHCPOFFER   chaddr: dc:a6:32:83:f4:1d (response MAC address)
   
   * Received 300 bytes from wlan0:192.168.4.1
     Offered IP address: 192.168.7.183
     Server IP address: N/A
     Relay-agent IP address: N/A
     BOOTP server: (empty)
     BOOTP file: (empty)
     DHCP options:
      Message type: DHCPOFFER (2)
      server-identifier: 192.168.4.1
      lease-time: 14400 ( 4h )
      netmask: 255.255.252.0
      router: 192.168.4.1
      dns-server: 192.168.4.1
      broadcast: 192.168.7.255
      ntp-server: 192.168.4.1
         --- end of options ---
   
   DHCP packets received on interface wlan0: 1
   DHCP packets received on interface eth0: 1

https://tricorder.pi-hole.net/4XhsiRa6/

Thanks. Ran the commands for the database issue and the logs are still showing the same error. Any advice on how to fix it? I also tried running the repair tool (just as part of my own troubleshooting) and no luck.

Not sure how to fix the DHCP issue. I haven’t changed a thing on the network.

Actually, I added my DNS to both open DNS slots in the Eero app and now it seems to have fixed that issue. I've always had the second DNS slot blank. Probably been an issue all along.

Can you confirm you see it too? https://tricorder.pi-hole.net/fq4BsSE2/

However, the db issue is still present. Thanks for your help!

Confirming that the debug log is visible at the fq4 URL provided.

I see

2024-11-20 09:50:25: (mod_fastcgi.c.449) FastCGI-stderr:PHP Warning:  SQLite3::query(): Unable to prepare statement: 26, file is not a database in /var/www/html/admin/api_db.php on line 385

Can you show us the details for the database file?

sudo ls -la /etc/pihole/pihole-FTL*.db

Edit: Everything is fine, the error messages are from before the most recent restart of Pi-hole, see the timestamp as compared to the startup messages copied below.

 [2024-11-20 10:58:49.699 17407M] Updating long-term database to version 12
   [2024-11-20 10:58:49.712 17407M] Resizing "FTL-strings" from 40960 to (81920 * 1) == 81920 (/dev/shm: 712.7KB used, 2.0GB total, FTL uses 700.8KB)
   [2024-11-20 10:58:49.713 17407M] Imported 0 alias-clients
   [2024-11-20 10:58:49.713 17407M] Database successfully initialized
   [2024-11-20 10:58:49.724 17407M] Imported 0 queries from the long-term database
   [2024-11-20 10:58:49.724 17407M]  -> Total DNS queries: 0
   [2024-11-20 10:58:49.724 17407M]  -> Cached DNS queries: 0
   [2024-11-20 10:58:49.724 17407M]  -> Forwarded DNS queries: 0
   [2024-11-20 10:58:49.724 17407M]  -> Blocked DNS queries: 0
   [2024-11-20 10:58:49.724 17407M]  -> Unknown DNS queries: 0
   [2024-11-20 10:58:49.724 17407M]  -> Unique domains: 0
   [2024-11-20 10:58:49.724 17407M]  -> Unique clients: 0
   [2024-11-20 10:58:49.725 17407M]  -> Known forward destinations: 0
   [2024-11-20 10:58:49.725 17407M] Successfully accessed setupVars.conf
   [2024-11-20 10:58:49.726 17407M] listening on 0.0.0.0 port 53
   [2024-11-20 10:58:49.726 17407M] listening on :: port 53
   [2024-11-20 10:58:49.728 17407M] PID of FTL process: 17407
   [2024-11-20 10:58:49.728 17407M] Listening on port 4711 for incoming IPv4 telnet connections
   [2024-11-20 10:58:49.729 17407M] Listening on port 4711 for incoming IPv6 telnet connections
   [2024-11-20 10:58:49.730 17407M] Listening on port 4711 for incoming socket telnet connections
   [2024-11-20 10:58:49.731 17407M] INFO: FTL is running as user pihole (UID 999)
   [2024-11-20 10:58:49.731 17407M] Reloading DNS cache
   [2024-11-20 10:58:49.836 17407/T17423] Compiled 3 whitelist and 0 blacklist regex filters for 1 clients in 3.5 msec
   [2024-11-20 10:58:49.836 17407/T17423] Blocking status is enabled
   [2024-11-20 10:58:50.080 17407M] New upstream server: 1.1.1.1:53 (0/512)
   [2024-11-20 10:58:50.080 17407M] New upstream server: 1.0.0.1:53 (1/512)
   [2024-11-20 11:00:43.866 17407M] Resizing "FTL-dns-cache" from 4096 to (512 * 16) == 8192 (/dev/shm: 753.7KB used, 2.0GB total, FTL uses 741.7KB)
   [2024-11-20 11:04:38.150 17407M] Resizing "FTL-dns-cache" from 8192 to (768 * 16) == 12288 (/dev/shm: 757.8KB used, 2.0GB total, FTL uses 745.8KB)
   [2024-11-20 11:08:48.354 17407M] Resizing "FTL-domains" from 12288 to (1024 * 24) == 24576 (/dev/shm: 761.9KB used, 2.0GB total, FTL uses 749.9KB)
   [2024-11-20 11:08:48.958 17407M] Resizing "FTL-dns-cache" from 12288 to (1024 * 16) == 16384 (/dev/shm: 774.1KB used, 2.0GB total, FTL uses 762.2KB)
   [2024-11-20 11:09:45.655 17407M] Resizing "FTL-dns-cache" from 16384 to (1280 * 16) == 20480 (/dev/shm: 778.2KB used, 2.0GB total, FTL uses 766.3KB)
   [2024-11-20 11:13:11.336 17407M] Resizing "FTL-dns-cache" from 20480 to (1536 * 16) == 24576 (/dev/shm: 782.3KB used, 2.0GB total, FTL uses 770.4KB)
   [2024-11-20 11:15:06.261 17407M] Resizing "FTL-dns-cache" from 24576 to (1792 * 16) == 28672 (/dev/shm: 786.4KB used, 2.0GB total, FTL uses 774.5KB)
   [2024-11-20 11:15:34.390 17407M] Resizing "FTL-dns-cache" from 28672 to (2048 * 16) == 32768 (/dev/shm: 790.5KB used, 2.0GB total, FTL uses 778.6KB)
   [2024-11-20 11:16:30.272 17407M] Resizing "FTL-dns-cache" from 32768 to (2304 * 16) == 36864 (/dev/shm: 794.6KB used, 2.0GB total, FTL uses 782.7KB)

So, everything is good now.

Thanks for your help

1 Like

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