Skip to content

Sharp memory increase and OOM after filter update on OpenWrt #8491

Description

@Daedalus86

Prerequisites

Platform (OS and CPU architecture)

Linux, ARM64

Installation

Custom package (OpenWrt, HomeAssistant, etc; please mention in the description)

Setup

On a router, DHCP is handled by the router

AdGuard Home version

v0.107.78

Action

AdGuard Home is running on an OpenWrt router with approximately 1 GB of RAM and no swap.

The problem occurs intermittently while AdGuard Home is operating normally.

During the most recently monitored occurrence, the following sequence was observed:

  1. At 23:00 local time, the AdGuard Home process with PID 12975 used 436528 kB RSS.
  2. At 23:23 local time, AdGuard Home started an automatic filter update.
  3. One of the updated filters contained 2103241 rules and had a downloaded size of 43460590 bytes.
  4. At 00:00 local time, the same AdGuard Home process with PID 12975 used 888148 kB RSS.
  5. AdGuard Home subsequently stopped responding.
  6. After AdGuard Home restarted, DNS resolution and the web interface worked again.

The AdGuard Home debug log uses UTC. The filter update therefore appears in the log at approximately 21:23 UTC.

Relevant AdGuard Home log entries:

2026/07/25 21:23:31.510459 12975#88 [debug] filtering: starting update

2026/07/25 21:23:33.545031 12975#88 [debug] filtering: downloading update for filter id=1758964205 url=https://adguardteam.github.io/HostlistsRegistry/assets/filter_44.txt

2026/07/25 21:23:46.202887 12975#88 [info] filtering: filter updated id=1758964205 bytes_written=43460590 rules_count=2103241

2026/07/25 21:23:46.382012 12975#88 [info] filtering: updated filter id=1758964205 rules_count=2103241 prev_rules_count=2080045

The automatic filter update strongly correlates with the sudden memory increase. I do not yet have a heap profile proving that the filter update is the direct root cause.

Expected result

AdGuard Home should update and reload filter lists without causing a permanent increase of several hundred megabytes in resident memory.

After the filter update has completed, memory usage should either return to approximately its previous level or remain low enough for AdGuard Home to continue operating normally.

DNS resolution and the AdGuard Home web interface should remain available after an automatic filter update.

Actual result

The resident memory usage of the same AdGuard Home process increased from 436528 kB to 888148 kB within the monitored one-hour interval.

Observed values:

2026-07-25 23:00 local time

PID: 12975
VmSize: 2250940 kB
VmRSS: 436528 kB
Threads: 14

2026-07-26 00:00 local time

PID: 12975
VmSize: 2250940 kB
VmRSS: 888148 kB
Threads: 14

The PID, virtual memory size and thread count remained the same, while resident memory increased by approximately 451620 kB.

AdGuard Home then stopped responding. DNS resolution and the AdGuard Home web interface were unavailable until AdGuard Home restarted.

The Linux kernel log also confirms that AdGuard Home has been killed by the OOM-killer on multiple occasions at a similar memory level:

Out of memory: Killed process 2464 (AdGuardHome) total-vm:2182124kB, anon-rss:880568kB, file-rss:1536kB, shmem-rss:0kB, UID:0 pgtables:1904kB oom_score_adj:0

Out of memory: Killed process 6193 (AdGuardHome) total-vm:2181940kB, anon-rss:878876kB, file-rss:4992kB, shmem-rss:0kB, UID:0 pgtables:1900kB oom_score_adj:0

These kernel log entries demonstrate that the problem has occurred more than once. They are not being presented as the kernel log entry for PID 12975 specifically.

Additional information and/or screenshots

Device: GL.iNet Flint 2 / GL-MT6000

Operating system: OpenWrt 24.10.7

CPU architecture: aarch64 / ARM64

AdGuard Home version: v0.107.78

Installation: standalone manual installation on OpenWrt

AdGuard Home binary: /opt/AdGuardHome/AdGuardHome

Configuration file: /opt/AdGuardHome/AdGuardHome.yaml

Available memory:

Approximately 1 GB RAM

The query log was checked during the relevant period and was not being rotated:

2026/07/25 21:03:05.978536 12975#90 [debug] querylog: oldest log entry entry_time=2026-07-22T20:46:44.143393617Z

2026/07/25 21:03:05.978680 12975#90 [debug] querylog: not rotating now=2026-07-25T21:03:05Z rotate_time=2026-08-21T20:46:44Z

A statistics flush also occurred at 21:00 UTC:

2026/07/25 21:00:00.340962 12975#89 [debug] stats: flushing unit id=495836 req_num=1342

I have enabled the AdGuard Home pprof endpoint and configured additional memory monitoring. The monitoring checks memory usage every 15 minutes and attempts to capture heap and goroutine profiles when configured RSS thresholds are exceeded.

At this moment, the automatic filter update is a strong correlation, but I do not yet have a heap profile proving that it directly causes the memory increase.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions