AdguardTeam / AdGuardHome

Network-wide ads & trackers blocking DNS server
https://adguard.com/adguard-home.html
GNU General Public License v3.0
24.65k stars 1.78k forks source link

My server becomes slow when resolving DNS while experiencing issues to https://family.adguard-dns.com:443/dns-query #7274

Open Marcus1Pierce opened 2 days ago

Marcus1Pierce commented 2 days ago

Prerequisites

The problem

There are many errors in my AdGuard Home logs with the following error like this:

2024/09/19 16:04:40.210170 [error] dnsproxy: https://family.adguard-dns.com:443/dns-query: response received over tcp: "reading https://family.adguard-dns.com:443/dns-query: net/http: request canceled (Client.Timeout or context cancellation while reading body)"
2024/09/19 16:04:41.953981 [error] dnsproxy: https://family.adguard-dns.com:443/dns-query: response received over tcp: "reading https://family.adguard-dns.com:443/dns-query: net/http: request canceled (Client.Timeout or context cancellation while reading body)"
2024/09/19 16:04:42.170730 [error] dnsproxy: https://family.adguard-dns.com:443/dns-query: response received over tcp: "requesting https://family.adguard-dns.com:443/dns-query: Get \"https://family.adguard-dns.com:443/dns-query?dns=AAABAAABAAAAAAAABDk4MTUCcGMDZG5zB2FkZ3VhcmQDY29tAAAQAAE\": net/http: request canceled (Client.Timeout exceeded while awaiting headers)"
2024/09/19 16:04:42.870441 [error] dnsproxy: https://family.adguard-dns.com:443/dns-query: response received over tcp: "requesting https://family.adguard-dns.com:443/dns-query: Get \"https://family.adguard-dns.com:443/dns-query?dns=AAABAAABAAAAAAAABDA2ODcCcGMDZG5zB2FkZ3VhcmQDY29tAAAQAAE\": net/http: request canceled (Client.Timeout exceeded while awaiting headers)"
2024/09/19 16:04:44.874861 [error] dnsproxy: https://family.adguard-dns.com:443/dns-query: response received over tcp: "reading https://family.adguard-dns.com:443/dns-query: net/http: request canceled (Client.Timeout or context cancellation while reading body)"

When this error appears, I tried to test the ping, and it turns out my server is having connection issues with family.adguard-dns.com. Here is the ping test with 100 packets to family.adguard-dns.com.

image

I'm not sure whether this is due to my poor connection or an issue with the DNS server, but this error is really making AdGuard Home very slow when resolving DNS. When I ping all the upstream servers I use, I don't experience any connection issues like I do with family.adguard-dns.com.

Proposed solution

There is another issue like https://github.com/AdguardTeam/AdGuardHome/issues/7175 and https://github.com/AdguardTeam/AdGuardHome/issues/6817 the solution was to disable 'Use AdGuard browsing security web service' and 'Use AdGuard parental control web service'. But I think there should be a better solution.

Perhaps instead of 'forcing' the connection to family.adguard-dns.com when enabling the 'Use AdGuard browsing security web service' and 'Use AdGuard parental control web service' while the server is down from the client side, we could switch to another server with the same functionality as family.adguard-dns.com. If my connection is truly experiencing issues, I might understand why my DNS is slow to resolve.

Alternatives considered and additional information

No response

Dynamic5912 commented 1 day ago

Use a different DNS service.

Also yes - disable the Security and Parental settings as they add unnecessary latency.

There's blocklists you can use that utilise the same results.

Marcus1Pierce commented 1 day ago

@Dynamic5912 For upstream, i didn't use any adguard dns. It looks like when i enable Security and Parental settings they always force me to use adguard family dns and like you said, it add unnecessary latency.

I know there's block list related to that and i already add that to filter list. But i don't know, i think when i can change the Security and Parental settings DNS to other dns like https://family.cloudflare-dns.com/dns-query it would be great.