New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When there are multiple upstream servers, the memory of the adguardhome will gradually increase until it goes down #6438
Comments
Unfortunately, we cannot reproduce that. Can you provide the upstreams you're using? |
You can try replicating it this way by turning off the cache and setting it to any number of upstream streams, with a request rate of 1000qps. At this point, you will see significant memory growth and the increased memory will not be reclaimed |
This comment was marked as duplicate.
This comment was marked as duplicate.
We do not see this behaviour in our tests. The only thing that's growing are things like query log and statistics buffers and safe browsing/parental control hash caches. If you do feel like there could be a resource leak, please collect the memory profile from your AGH by setting |
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
this is debug log file |
Memory leaks occur when parallel requests are used. |
This comment was marked as duplicate.
This comment was marked as duplicate.
这种情况出现在v0.108.0-b.50,有可能不是多个上游导致的,更新后,服务器4G内存在半个小时内只剩下10%的可用,CPU涨到了50%。并且只是更新,没有修改任何数据。 |
请问有什么办法避免这个问题吗 |
在v0.108.0-b.49或以下版本未出现这种异常。可以尝试使用v0.108.0-b.49或以下版本。 |
I didn't find a memory leak with a single upstream. I suspect it has something to do with their new upstream feature in b50. Hopefully the adguardhome team can fix this memory leak. |
Thank you for the profiles, we've been able to reproduce the goroutine leak. @EugeneOne1, this is reproduceable using e.g. |
Okay, thank you very much. |
Updates AdguardTeam/AdGuardHome#6438. Squashed commit of the following: commit 3dbe47f Merge: dc6b77c 8f0cbea Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Nov 23 19:43:43 2023 +0300 Merge branch 'master' into 6438-fix-leak commit dc6b77c Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Nov 23 17:35:51 2023 +0300 upstream: fix goroutines leak
@6aink, hello again. We've pushed an edge build that should fix this leak. Could you please try it out? |
OK, wait a minute. |
I probably observed for ten minutes, the memory has no upward trend, the problem has been solved, thank you. |
I see that the memory is rising again, but not very fast. I will try to watch it for another hour. |
I tested it for a few hours, and the memory stabilized at 300m, and there was no problem. |
@6aink, thanks for testing! We'll include this to the following |
Updates AdguardTeam#6438. Squashed commit of the following: commit dba0750 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Nov 23 19:57:46 2023 +0300 all: upd proxy
Edge build looks like fixed the issue so far, testing for over 4 hours, no increase of memory use. |
seems this issue still persists in 108.b51 version.
|
Prerequisites
I have checked the Wiki and Discussions and found no answer
I have searched other issues and found no duplicates
I want to report a bug and not ask a question or ask for help
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, AMD64 (aka x86_64)
Installation
GitHub releases or script from README
Setup
On one machine
AdGuard Home version
v0.108.0-a.762+388583ce
Action
When there are multiple upstream servers, the memory of the adguardhome will gradually increase until it goes down
Expected result
Memory no longer rises and can be used normally
Actual result
memory explosion
Additional information and/or screenshots
No response
The text was updated successfully, but these errors were encountered: