AdGuardHome icon indicating copy to clipboard operation
AdGuardHome copied to clipboard

Adguard home slows down on bad networks

Open HeyShah opened this issue 4 months ago • 12 comments

Prerequisites

Platform (OS and CPU architecture)

Linux, ARMv6

Installation

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

Setup

On a router, DHCP is handled by the router

AdGuard Home version

0.107.57

Action

When on a slow network or on a slow resolver adguardhome becomes unusable So bad that a single query takes 200.000 ms or even more Its a problem with adguard tho as using yogadns on my pc shows the query times are around 200ms

Expected result

Adguard should work normal on laggy networks or bad resolvers

Actual result

But it gets so bad that even trying to change the setting could freeze the whole adguardhome and needs to be restarted in order for settings to apply Im on openwrt

Additional information and/or screenshots

No response

HeyShah avatar Jul 16 '26 15:07 HeyShah

What's the ram/cpu usage?

Sounds like an isolated/hardware issue

Dynamic5912 avatar Jul 16 '26 18:07 Dynamic5912

its an ac1304 both are less than 50% when thi accures the router run fine too but adguard home crashes when there are network problems

HeyShah avatar Jul 16 '26 18:07 HeyShah

Hello, could you please tell me if this issue only occurs in version 0.107.57? Have you tried installing the earliest stable version?

sofvaskina avatar Jul 17 '26 07:07 sofvaskina

I dont know i have the latest version available to me through the openwrt luci package manager which is that

HeyShah avatar Jul 17 '26 13:07 HeyShah

It tells you what version you are running on the dashboard...

Dynamic5912 avatar Jul 17 '26 14:07 Dynamic5912

Ik Its mentioned in the issue itself 0.107.57

HeyShah avatar Jul 17 '26 14:07 HeyShah

Hi, we would like to clarify once again. Have you tried installing the earliest stable version?

GulnazSalakhova avatar Jul 27 '26 10:07 GulnazSalakhova

Yes unless the latest stable version is not the latest stable version on the openwrt package manager

HeyShah avatar Jul 27 '26 23:07 HeyShah

The latest AdGuard Home version is v0.107.78. Please install it and check whether the issue still occurs on slow networks or upstream resolvers.

GulnazSalakhova avatar Jul 28 '26 09:07 GulnazSalakhova

Image i dont want to risk tho

HeyShah avatar Jul 28 '26 16:07 HeyShah

I profiled the relevant paths on current master with deterministic slow upstreams. Two latency amplifiers are confirmed, but the report does not yet contain enough configuration or current-version evidence to identify a safe code fix:

  • In load_balance mode, failed upstream attempts are sequential. Four controlled 100 ms failures took 407–409 ms; the same setup in parallel mode took 101–102 ms across five race-enabled runs.
  • max_goroutines can add queueing delay during slow work. With a limit of one and a controlled 100 ms upstream, the second UDP query completed at about 202 ms instead of about 101 ms without the limit.

The first behavior also exists in the dnsproxy version used by AdGuard Home v0.107.57. With the default 10-second upstream timeout, a sufficiently long list of unreachable sequential upstreams can plausibly approach the reported 200 seconds. The production goroutine limit is much higher, so the second mechanism needs concurrent traffic to matter.

I could not confirm the settings freeze from current code: query resolution does not hold AdGuard Home's main server lock while waiting for an upstream, and upstream testing is concurrent. To distinguish a configuration-sensitive delay from a separate settings-path defect, could you provide:

  1. sanitized upstream_dns, upstream_mode, upstream_timeout, bootstrap_dns, fallback_dns, and max_goroutines values;
  2. debug logs covering one 200-second query and one frozen settings operation;
  3. the exact operation that freezes (testing upstreams, saving DNS settings, or another page);
  4. approximate query rate/client count; and
  5. a reproduction on the latest supported release.

As a diagnostic only, comparing parallel mode with a one-second timeout and a short known-good upstream list would be useful. That is not an unconditional fix—parallel mode changes upstream traffic and privacy characteristics—but the comparison will show whether sequential failover is the dominant delay.

Validation on current master:

PASS: controlled sequential-vs-parallel timing probe, 5x under -race
PASS: controlled max_goroutines queueing probe, 5x under -race
PASS: go test -race -count=1 ./internal/dnsforward

I did not retain a patch because a global deadline or failover-policy change would alter dnsproxy semantics without evidence that it addresses the separate settings symptom.

Sil3ntVip3r avatar Aug 03 '26 16:08 Sil3ntVip3r

We recommend that you update to the latest stable version.

sofvaskina avatar Aug 27 '26 10:08 sofvaskina