unbound、dnscrypt-proxy内存占用过高 导致频繁发生 OOM(Out of Memory)事件 #266
-
将上方的系统日志文件发给deepseek进行分析,告知我: 我的docker命令是:
内存使用情况: |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 3 replies
-
docker exec paopaodns debug.sh== debug.sh : docker exec -it paopaodns sh ==-> debug start [INFO] images build time : 2024-08-28 16:12:23 UTC
[OK]DATA_writeable
[OK]DATA_readable
[INFO] NETWORK
*********************************************************************************
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
2: eth0@if36: <BROADCAST,MULTICAST,UP,LOWER_UP,M-DOWN> mtu 1500 qdisc noqueue state UP
inet 172.17.0.2/16 brd 172.17.255.255 scope global eth0
default via 172.17.0.1 dev eth0
172.17.0.0/16 dev eth0 scope link src 172.17.0.2
traceroute to 120.53.53.53 (120.53.53.53), 4 hops max, 46 byte packets
1 172.17.0.1 (172.17.0.1) 0.017 ms 0.016 ms 0.015 ms
2 192.168.1.251 (192.168.1.251) 0.808 ms 0.926 ms 0.498 ms
3 10.251.251.251 (10.251.251.251) 0.885 ms 0.616 ms 0.487 ms
4 218.75.22.193 (218.75.22.193) 3.661 ms 3.180 ms 4.048 ms
PING 223.5.5.5 (223.5.5.5): 56 data bytes
64 bytes from 223.5.5.5: seq=0 ttl=112 time=12.362 ms
--- 223.5.5.5 ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 12.362/12.362/12.362 ms
PING 119.29.29.29 (119.29.29.29): 56 data bytes
64 bytes from 119.29.29.29: seq=0 ttl=46 time=30.593 ms
--- 119.29.29.29 ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 30.593/30.593/30.593 ms
Server: 223.5.5.5
Address: 223.5.5.5#53
Non-authoritative answer:
www.taobao.com canonical name = www.taobao.com.danuoyi.tbcache.com.
Name: www.taobao.com.danuoyi.tbcache.com
Address: 122.225.209.193
Name: www.taobao.com.danuoyi.tbcache.com
Address: 122.225.209.194
Name: www.taobao.com.danuoyi.tbcache.com
Address: 240e:f7:8013:401:3::23
Name: www.taobao.com.danuoyi.tbcache.com
Address: 240e:f7:8013:401:3::24
Server: 119.29.29.29
Address: 119.29.29.29#53
Non-authoritative answer:
www.qq.com canonical name = ins-r23tsuuf.ias.tencent-cloud.net.
Name: ins-r23tsuuf.ias.tencent-cloud.net
Address: 101.91.42.232
Name: ins-r23tsuuf.ias.tencent-cloud.net
Address: 101.91.22.57
Name: ins-r23tsuuf.ias.tencent-cloud.net
Address: 240e:e1:a800:120::76
Name: ins-r23tsuuf.ias.tencent-cloud.net
Address: 240e:e1:a800:120::36
*********************************************************************************
[INFO] ENV
*********************************************************************************
====ENV TEST====
[OK]DATA_writeable-
[OK]DATA_readable-
MEM:500m 1000m 500000 1500mb
prefPC:100
CORES:-4-
POWCORES:-4-
ulimit :-1048576-
FDLIM :-4096-
TZ:-Asia/Shanghai-
UPDATE:-weekly-
DNS_SERVERNAME:-PaoPaoDNS,blog.03k.org-
SERVER_IP:-none-
ETHIP:-172.17.0.2-
DNSPORT:-53-
SOCKS5:-127.0.0.1:10808-
CNAUTO:-yes-
IPV6:-no-
CNFALL:-yes-
CUSTOM_FORWARD:-IP:PORT-
AUTO_FORWARD:-no-
AUTO_FORWARD_CHECK:-yes-
USE_MARK_DATA:-yes-
RULES_TTL:-0-
CUSTOM_FORWARD_TTL:-0-
SHUFFLE:-no-
EXPIRED_FLUSH:-yes-
CN_TRACKER:-yes-
USE_HOSTS:-no-
HTTP_FILE:-no-
SAFEMODE:--
QUERY_TIME:-2000ms-
ADDINFO:-no-
PLATFORM:-Linux paopaodns 5.15.189 #0 SMP Fri Jul 25 20:04:56 2025 x86_64 Linux-
====ENV TEST====
mosdns kkkgo/mosdns:240822.1
total 3M
4.0K drwxrwxrwx 3 0 0 4.0K Aug 14 11:25 .
4.0K drwxr-xr-x 1 0 0 4.0K Aug 14 11:25 ..
248.0K -rw-r--r-- 1 0 0 247.9K Aug 14 11:25 Country-only-cn-private.mmdb
0 -rwxrwxrwx 1 0 0 0 Aug 9 15:35 custom_cn_mark.txt
4.0K -rwxrwxrwx 1 0 0 233 Aug 14 11:04 custom_env.ini
4.0K -rwxrwxrwx 1 0 0 416 Aug 14 11:25 custom_mod.yaml
4.0K drwxr-xr-x 2 0 0 4.0K Aug 14 11:25 dnscrypt-resolvers
4.0K -rw-r--r-- 1 0 0 3.0K Aug 14 11:25 dnscrypt.toml
4.0K -rwxrwxrwx 1 0 0 670 Aug 9 15:35 force_dnscrypt_list.txt
4.0K -rwxrwxrwx 1 0 0 387 Aug 9 15:35 force_recurse_list.txt
0 -rwxrwxrwx 1 0 0 0 Aug 9 15:35 force_ttl_rules.txt
1.3M -rw-r--r-- 1 0 0 1.3M Aug 14 11:25 global_mark.dat
12.0K -rw-r--r-- 1 0 0 10.0K Aug 14 11:25 mosdns.yaml
8.0K -rw-r--r-- 1 0 0 5.7K Aug 14 11:25 redis.conf
1.0M -rwxrwxrwx 1 0 0 1021.0K Aug 14 08:31 redis_dns_v2.rdb
28.0K -rwxrwxrwx 1 0 0 25.5K Aug 14 10:54 trackerslist.txt
52.0K -rw-r--r-- 1 0 0 50.9K Aug 14 11:25 unbound.conf
4.0K -rwxrwxrwx 1 0 0 289 Aug 9 15:35 unbound_custom.conf
*********************************************************************************
[INFO] PS
*********************************************************************************
PID USER TIME COMMAND
1 root 0:00 {init.sh} /bin/sh /usr/sbin/init.sh
23 root 0:00 crond
56 root 0:00 redis-server unixsocket:/tmp/redis.sock
214 root 0:00 dnscrypt-proxy -config /data/dnscrypt-resolvers/dnscrypt.toml
215 root 0:00 dnscrypt-proxy -config /data/dnscrypt-resolvers/dnscrypt_socks.toml
233 root 0:00 unbound -c /tmp/unbound_forward.conf -p
244 root 0:00 mosdns start -d /tmp -c /tmp/mosdns.yaml
257 root 0:00 {watch_list.sh} /bin/sh /usr/sbin/watch_list.sh
258 root 0:00 {data_update.sh} /bin/sh /usr/sbin/data_update.sh
260 root 0:00 sleep 300
263 root 0:00 tail -f /dev/null
276 root 0:01 unbound -c /tmp/unbound_raw.conf -p
295 root 0:00 inotifywait -e modify,delete /etc/unbound/named.cache /data/Country-only-cn-private.mmdb /data/force_recurse_list.txt /data/force_dnscrypt_list.txt /data/custom_env.ini /data/global_mark.dat /data/custom_cn_mark.txt /data/trackerslist.txt
407 root 0:00 {debug.sh} /bin/sh /usr/sbin/debug.sh
429 root 0:00 ps -ef
276 root 0:01 unbound -c /tmp/unbound_raw.conf -p
unbound OK.
233 root 0:00 unbound -c /tmp/unbound_forward.conf -p
unbound_forward OK.
*********************************************************************************
[INFO] TOP
*********************************************************************************
CPU: 0% usr 0% sys 0% nic 100% idle 0% io 0% irq 0% sirq
PID PPID USER STAT VSZ %VSZ CPU %CPU COMMAND
276 1 root S 2430m 31% 1 0% unbound -c /tmp/unbound_raw.conf -
244 1 root S 1211m 15% 3 0% mosdns start -d /tmp -c /tmp/mosdn
214 1 root S 1210m 15% 1 0% dnscrypt-proxy -config /data/dnscr
215 1 root S 1210m 15% 1 0% dnscrypt-proxy -config /data/dnscr
233 1 root S 613m 8% 1 0% unbound -c /tmp/unbound_forward.co
56 1 root S 24248 0% 2 0% redis-server unixsocket:/tmp/redis
257 1 root S 1696 0% 3 0% {watch_list.sh} /bin/sh /usr/sbin/
258 1 root S 1644 0% 3 0% {data_update.sh} /bin/sh /usr/sbin
1 0 root S 1640 0% 3 0% {init.sh} /bin/sh /usr/sbin/init.s
407 0 root S 1636 0% 3 0% {debug.sh} /bin/sh /usr/sbin/debug
436 407 root R 1632 0% 0 0% top -n1
263 1 root S 1624 0% 2 0% tail -f /dev/null
260 258 root S 1620 0% 3 0% sleep 300
437 407 root S 1620 0% 2 0% grep %
295 257 root S 1080 0% 3 0% inotifywait -e modify,delete /etc/
23 1 root S 868 0% 1 0% crond
*********************************************************************************
[INFO] REDIS
*********************************************************************************
used_memory_human:2.23M
used_memory_rss_human:5.75M
used_memory_peak_human:2.26M
total_system_memory_human:7.62G
used_memory_lua_human:31.00K
used_memory_vm_total_human:63.00K
used_memory_scripts_human:181B
maxmemory_human:1.46G
5133
*********************************************************************************
[TEST] IP ROUTE
*********************************************************************************
CN IP URL:
218.75.22.196
-
218.75.22.196
--
CN RAW-IP URL:
------------------
Non-CN IP URL:
218.75.22.196
-
218.75.22.196
--
218.75.22.196
Non-CN RAW-IP URL:
-
218.75.22.196
--
---
218.75.22.196
------------------
IP INFO:
218.75.22.196
CN,Shanghai,Shanghai
ASN4134/Yongjia Feilan Lier Internet Bar
HTTP/1.1
Mozilla/5.0 Gecko/20100101 Firefox/120.0 https://github.com/kkkgo/PaoPaoDNS
Asia/Shanghai Time: 8/14/2025, 11:26:38 AM
[INFO] force_recurse_list
domain:whoami.ds.akahelp.net
domain:whoami.03k.org
MOSDNS WHOAMI :
MOSDNS akahelp: "ns" "218.75.22.196"
MOSDNS 03k: 218.75.22.196
UNBOUND WHOAMI:
UNBOUND akahelp: "ns" "218.75.22.196"
UNBOUND 03k: 218.75.22.196
*********************************************************************************
[TEST] HIJACK
*********************************************************************************
;; communications error to 9.8.7.5#53: timed out
;; no servers could be reached
;; communications error to 9.8.7.6#53: timed out
;; no servers could be reached
HIJACK 127.0.0.1 = 127.0.0.202
*********************************************************************************
[TEST] DIG-CN [taobao]
*********************************************************************************
MOSDNS CN:
www.taobao.com.danuoyi.tbcache.com.
122.225.209.193
122.225.209.194
UNBOUND CN:
www.taobao.com.danuoyi.tbcache.com.
122.225.209.193
122.225.209.194
[TEST] DIG-NOCN [youtube]
MOSDNS NOCN:
youtube-ui.l.google.com.
216.58.208.206
142.250.75.14
DNSCRYPT-UNBOUND NOCN:
youtube-ui.l.google.com.
142.250.203.142
172.217.16.14
DNSCRYPT NOCN:
youtube-ui.l.google.com.
142.250.177.14
192.178.56.206
DNSCRYPT-SOCKS5 NOCN:
;; communications error to 127.0.0.1#5303: timed out
;; no servers could be reached
*********************************************************************************
[TEST] DUAL CN [IPv6=YES will have aaaa,taobao]
*********************************************************************************
[TEST] DUAL NOCN [IPv6=YES will block aaaa,youtube]
[TEST] ONLY6 [IPv6=only6 will block aaaa if a ok]
checkipv6.synology.com : ip6.03k.org : 6.ipw.cn :
*********************************************************************************
[info] ALL TEST FINISH.-> debug end |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
另外还有,如果用的是树莓派,本身自带的内存是2G,也用/proc/meminfo大法? |
Beta Was this translation helpful? Give feedback.
-
|
你不要管deepseek怎么说,程序就是这么写的,往小了改没问题。 |
Beta Was this translation helpful? Give feedback.

参考
#218
#129