Adguard home slows down on bad networks
Prerequisites
-
[x] I have checked the Wiki and Discussions and found no answer
-
[x] I have searched other issues and found no duplicates
-
[x] I want to report a bug and not ask a question or ask for help
-
[x] I have set up AdGuard Home correctly and configured clients to use it. (Use the Discussions for help with installing and configuring clients.)
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
What's the ram/cpu usage?
Sounds like an isolated/hardware issue
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
Hello, could you please tell me if this issue only occurs in version 0.107.57? Have you tried installing the earliest stable version?
I dont know i have the latest version available to me through the openwrt luci package manager which is that
It tells you what version you are running on the dashboard...
Ik Its mentioned in the issue itself 0.107.57
Hi, we would like to clarify once again. Have you tried installing the earliest stable version?
Yes unless the latest stable version is not the latest stable version on the openwrt package manager
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.
i dont want to risk tho
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_balancemode, failed upstream attempts are sequential. Four controlled 100 ms failures took 407–409 ms; the same setup inparallelmode took 101–102 ms across five race-enabled runs. max_goroutinescan 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:
- sanitized
upstream_dns,upstream_mode,upstream_timeout,bootstrap_dns,fallback_dns, andmax_goroutinesvalues; - debug logs covering one 200-second query and one frozen settings operation;
- the exact operation that freezes (testing upstreams, saving DNS settings, or another page);
- approximate query rate/client count; and
- 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.
We recommend that you update to the latest stable version.