dnsproxy: HTTP3 upstream memory leak
RAM USAGE too much after running 2 hours.
systemctl status adguard-dnsproxy
● adguard-dnsproxy.service - dnsproxy
Loaded: loaded (/etc/systemd/system/adguard-dnsproxy.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2022-11-02 15:16:50 WIB; 2h 43min ago
Docs: https://github.com/AdguardTeam/dnsproxy#readme
Main PID: 27947 (dnsproxy-helper)
Tasks: 10 (limit: 2359)
Memory: 1.2G
CPU: 22min 44.463s
CGroup: /system.slice/adguard-dnsproxy.service
├─27947 /bin/sh /opt/adguard/dnsproxy-helper.sh start
└─27973 /opt/adguard/dnsproxy --listen=127.0.2.1 --config-path=/etc/adguard/dnsproxy.yml
python3 ps_mem.py
Private + Shared = RAM used Program
4.0 KiB + 0.5 KiB = 4.5 KiB dhclient
4.0 KiB + 0.5 KiB = 4.5 KiB unattended-upgr
4.0 KiB + 1.5 KiB = 5.5 KiB dnsproxy-helper
8.0 KiB + 1.0 KiB = 9.0 KiB agetty (2)
28.0 KiB + 8.5 KiB = 36.5 KiB dbus-daemon
32.0 KiB + 16.5 KiB = 48.5 KiB polkitd
44.0 KiB + 8.0 KiB = 52.0 KiB chronyd (2)
100.0 KiB + 5.5 KiB = 105.5 KiB systemd-udevd
132.0 KiB + 32.5 KiB = 164.5 KiB cron
108.0 KiB + 64.5 KiB = 172.5 KiB systemd-resolved
112.0 KiB + 78.5 KiB = 190.5 KiB systemd-logind
260.0 KiB + 18.5 KiB = 278.5 KiB packagekitd
364.0 KiB + 63.5 KiB = 427.5 KiB vnstatd
496.0 KiB + 30.5 KiB = 526.5 KiB rsyslogd
560.0 KiB + 229.5 KiB = 789.5 KiB systemd (3)
1.2 MiB + 118.5 KiB = 1.3 MiB bash
4.3 MiB + 679.5 KiB = 4.9 MiB nginx (3)
7.9 MiB + 225.5 KiB = 8.1 MiB systemd-journald
3.0 MiB + 6.2 MiB = 9.2 MiB sshd (5)
338.6 MiB + 0.5 KiB = 338.6 MiB nginx-rc
1.2 GiB + 0.5 KiB = 1.2 GiB dnsproxy
---------------------------------
1.5 GiB
=================================
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 23 (7 by maintainers)
Commits related to this issue
- Added an option to expose pprof info Users can now specify the --prof flag to make dnsproxy expose pprof info to localhost:6060. Updates #285 — committed to AdguardTeam/dnsproxy by ameshkov 2 years ago
- Pull request: Added an option to expose pprof info Merge in DNS/dnsproxy from pprof to master Squashed commit of the following: commit cd92926cc1f18c06213672d81ea41d96b96770db Author: Andrey Meshko... — committed to AdguardTeam/dnsproxy by ameshkov 2 years ago
Well, so it’s confirmed that the problem is in the DoH3 upstream implementation.
We’ll need a pprof dump then.
Can you build dnsproxy from my branch https://github.com/AdguardTeam/dnsproxy/tree/pprof ?
If you can, then please do the following:
--pprof
flaghttp://localhost:6060/debug/pprof/heap
and share with meokay, i removed parameter
http3: yes
and resolver h3 also DoQ, still with 25MB rmem_max to see the different.sorry i did typo, since i used the premium resolver from them so i changes it to public resolver.
i following various tutorials, indeed i am set them to 25MB at the moment. is it causing the memory usage so high?