Repository navigation
Sudden RSS explosion (500 MB → 6 GB in under a minute) with full process freeze, no preceding change in query or failure rate #2136
Replies: 1 comment
|
Thanks for the feedback. There is already a bug reported in #2093 which causes the DNS server to use up all memory and crash when a certain domain names are resolved. I guess the issue you see is related to the same bug. This bug has been fixed and will be available in the upcoming update. If you see any different error in the DNS logs related to out of memory then do share the complete log here.
If the error logs just say request timed out and if you are running the DNS server in recursive resolver mode then such operational issues can occur depending on network conditions. If you have Serve Stale enabled then it handles most of these issues by using stale data from cache so end users do not notice it. These timeout errors are something that is related to the network conditions and there is no fix to such issues. |
Uh oh!
There was an error while loading. Please reload this page.
Sudden RSS explosion (500 MB → 6 GB in under a minute) with full process freeze, no preceding change in query or failure rate
Summary
On a recursive-only resolver serving ~9M queries/day, the process memory jumps
from a stable ~500 MiB to the container's memory limit in under a minute,
pegs one core at ~95% CPU, and stops logging entirely for about 4 minutes.
It then either recovers or is OOM-killed by the kernel.
There is no precursor in the logs: query rate and resolution-failure rate
are completely normal right up to the second it happens.
This has occurred at least 7 times in 12 days, at irregular hours.
Environment
Dashboard for a typical hour: 378,254 total queries, 95.72% NoError,
1.88% ServFail, 2.29% NXDomain, 82.62% cached, 15.58% recursive.
Timeline of the most recent occurrence (all times UTC)
Container CPU and memory graphs for the same window show a flat baseline
(~8% CPU, ~512 MiB) with a vertical rise to 95% / 6 GiB and an equally
vertical fall.
Kernel OOM records (from the Proxmox host)
Six kills before the memory limit was raised from 2 GiB to 6 GiB. Note the
RSS at kill time is identical every time — it is the cgroup ceiling, not
the end of a gradual climb:
systemd logs the death as
code=killed, status=9/KILLand restarts the unit10 s later (
Restart=always,RestartSec=10).What has been ruled out
account for gigabytes.
6,979 queries and the top domain was
graph.facebook.com(8,494), i.e.ordinary traffic. Recursion is not reachable from the internet
(
dig @<public IP>times out from outside).through the entire hour, including the minute before the freeze.
vertically. It does not creep up.
Chronic resolution failures present during (and outside) the window
These fail continuously all day, every day, and are the top failing domains
in the incident window as well — so they are not obviously the trigger, but
they are what the resolver spends its failures on:
Their failures are
DnsClientNoResponseException … request timed outagainst the delegation's name servers.
What I can provide
A 20-second-interval RSS sampler is now running as a systemd unit, so the
next occurrence will be captured with the shape of the rise (ramp vs. step).
Happy to provide that, the full log for the window, or run any diagnostic
build.
Question
Is there a bound on in-flight recursive resolution state, or anything that
could allocate multiple GB in response to a single query or internal
operation? The complete absence of logging during the freeze suggests the
process is not merely busy but stalled — possibly GC thrashing against the
cgroup ceiling.
All reactions