Skip to content

DNS dying if pihole-FTL.db gets too large #2715

@abraxas86

Description

@abraxas86

Versions

Core version is v6.1.4 (Latest: v6.1.4)
Web version is v6.2.1 (Latest: v6.2.1)
FTL version is v6.2.3 (Latest: v6.2.3)

Platform

  • OS and version: Raspbian GNU/Linux 12 (bookworm)
  • Platform: Raspberry Pi 3 Model B Plus Rev 1.3

Expected behavior

Some way to manage flooding to the pihole-FTL database, or way to manage applications or websites that may be flooding requests.

Actual behavior / bug

I have a program running on one of the computers on my network that is maybe very un-optimized in the way that it was designed. It is possible to have it absolutely pummel Twitch’s eventusb API, which crushes my FTL database. This in turn kills the CPU on my Raspberry Pi and takes down my entire network’s DNS lookup (and internet access) until the Pihole calms down. I think this opens up a door to abuse - if you write something that relies on advertisements and you don't get the result back, you could potentially flood the DB and take the user's entire internet connection down.

My pihole-FTL database was at 1.6gb. After I removed all the eventsub rows from the table and vacuumed it, the db was down to 234mb.

I’m not sure what the best route would be to fix this - if we have an ability to not log trusted domains then this could be used to send ad requests through a previously trusted domain making it harder to track down. Maybe if we had the way to offload stuff to smaller tables in another database? Something like a quarantine that isn't queried as often as FTL, and that won't peg the CPU at 100% if something floods it?

As a workaround, I'll have to run a script every few hours to purge the rows from the table and vacuum the database.

Steps to reproduce the behavior:

  1. Install something like Chatterino2, making sure Eventsub is enabled
  2. Add around 40 different chat panels and tabs
  3. Let it run for a day or two
  4. Watch your pihole throttle and take down your DNS lookups while it parses the FTL database

Debug Token

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions