mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2026-03-04 00:01:12 -05:00
AdGuardHome seem's to leak memory until the machine dies #916
Labels
No labels
P1: Critical
P2: High
P3: Medium
P4: Low
UI
bug
cannot reproduce
compatibility
dependencies
docker
documentation
duplicate
enhancement
enhancement
external libs
feature request
good first issue
help wanted
infrastructure
invalid
localization
needs investigation
performance
potential-duplicate
question
recurrent
research
snap
waiting for data
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/AdGuardHome#916
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Xuxe on GitHub (Sep 10, 2019).
AdGuard.txt
Issue Details
Expected Behavior
AdGuard doesn't leaks memory until the machine gets unresponsive and ends in high cpu usage.
May relates to #905 ?
I have the issue with two instances of AdGuard Home with the same version and setup.
Actual Behavior
The memory usage constantly goes up:
Memory graph from 09.09.19 8:52 to 10.09.19 0:58:

and ends with high cpu usage until the machine dies:
CPU graph of the last 4 Hours:

Additional Information
My current work a round is to set a CPU Quota of 50% with systemd, which helps to kill the process ASAP when the issue rises before it kills the complete system. This is what you can see in the Memory graphs when the usage drops and increments again.
@szolin commented on GitHub (Sep 10, 2019):
Hello!
Can you run this command and show the output?
ps aux | grep AdGuardHome@Xuxe commented on GitHub (Sep 10, 2019):
@szolin
Hi :)
this is the output:
root@dns01:~# ps aux | grep AdGuardHome
root 604 0.0 13.1 116836 68704 ? Ssl 13:21 0:08 /opt/AdGuard/AdGuardHome -s run
root 4515 0.0 0.1 3080 824 pts/2 S+ 14:00 0:00 grep AdGuardHome
Also added my config quickly to the issue, if needed.
@ameshkov commented on GitHub (Sep 10, 2019):
How many different clients does it have?
@szolin it'd be helpful if we had http/pprof registered: https://golang.org/pkg/net/http/pprof/
@Xuxe commented on GitHub (Sep 10, 2019):
@ameshkov
My current setup is:
2x PowerDNS Recursor with a PowerDNS Authorative for a local domain in front of AdGuard all clients talking to the PDNS Recursor and the recursors are talking to AdGuard for non local domains. Around 15-20 clients. The Recursors also do there own caching, there shouldn't be much load on AdGuard its self. What i see in the UI is 7k querys since the reset around an hour ago.
@szolin commented on GitHub (Sep 10, 2019):
AGH uses 68mb of RAM - it's normal.
Are there any other processes that use more of your system memory?
When your CPU usage is 100% - what process uses it?
@Xuxe commented on GitHub (Sep 10, 2019):
@szolin
Sorry if it was not clear. I had to reset the system because it was inaccesable by SSH or console. At the moment the issue doesn't exists. AdGuard is the only thing that runs in this LXC container.
As you can see from check mk event history:
The very first issue Check MK reports is DNS runs in a timeout. Then ASAP the system freaks out in terms of CPU. I try to cover you the ps output as soon as the memory increases again. I'm not sure if there is a way to reproduce it at the moment. I tested also to do a nslookup which isn't working too at that point.
Complete ps aux:
@szolin commented on GitHub (Sep 10, 2019):
AGH's system usage looks normal.
We need to see what it looks like when (or just before) your memory usage becomes too high.
@ameshkov commented on GitHub (Sep 10, 2019):
What about AGH logs?
@Xuxe commented on GitHub (Sep 11, 2019):
It looks like AdGuard is not the root cause. Somehow systemd socket activation which is used by Check_MK seems to leak memory and triggers that OOM condition on Debian 10 followed by high CPU usage from AdGuard as side effect.
I close the issue, sorry for blaming AGH. Thanks for AGH, keep up the work :)