v2fly / v2ray-core

A platform for building proxies to bypass network restrictions.
https://v2fly.org
MIT License
28.34k stars 4.53k forks source link

内存很难得到释放 #1806

Closed betaxab closed 1 year ago

betaxab commented 2 years ago

你正在使用哪个版本的 V2Ray?

v4.45.0

你的使用场景是什么?

正常浏览网站,且不确定什么导致内存占用暴涨

你看到的异常现象是什么?

内存占用暴涨,无法释放,重启v2ray进程后才能恢复到正常使用水平

连接用户也就不到10个,实在是无法判断是什么原因导致的,不是服务器问题。这个问题存在很久了,忍不住要发issue了。 通过 rc-local 开机启动,有时候甚至还会内存溢出被系统杀掉 rc-local。

你期待看到的正常表现是怎样的?

应正常释放内存

请附上你的配置

服务端配置: {"log":{"loglevel":"debug","access":"access.log","error":"error.log"},"api":{"services":["HandlerService","StatsService"],"tag":"api"},"dns":{},"stats":{},"inbounds":[{"port":1445,"protocol":"vmess","settings":{"clients":[]},"sniffing":{"enabled":true,"destOverride":["http","tls"]},"streamSettings":{"network":"tcp","security":"tls","tlsSettings":{"certificates":[{"certificateFile":"\/root\/.cert\/server.crt","keyFile":"\/root\/.cert\/server.key"}]}},"tag":"proxy"},{"listen":"127.0.0.1","port":8011,"protocol":"dokodemo-door","settings":{"address":"0.0.0.0"},"tag":"api"}],"outbounds":[{"protocol":"freedom","settings":{}},{"protocol":"blackhole","settings":{},"tag":"block"}],"routing":{"rules":[{"type":"field","inboundTag":"api","outboundTag":"api"},{"type":"field","domain":["regexp:(.\.||)(aboluowang|bannedbook|botanwang|boxun|breakgfw|chinaaid|creaders|dafahao|dajiyuan|dongtaiwang|dwnews|edoors|epochtimes|epochtimes-romania|epochweekly|erabaru|falunaz|falundafa|falungong|falungong|huaglad|jinpianwang|lagranepoca|mhradio|minghui|mingjinglive|mingjingnews|ninecommentaries|ntd|ntdtv|ntdtv-dc|oneplusnews|qi-gong|renminbao|rfa|secretchina|soundofhope|theepochtimes|tuidang|voachinese|wujieliulan|xinsheng|xizang-zhiye|zhengjian)\.(club|cn|co.jp|co.kr|co.ol|com|com.cn|com.tw|de|eu|fr|hk|info|jp|me|net|org|ru|top|tv|tw)","regexp:(.\.||)(xunlei|sandai)\.(cn|com|com.cn|net|org)","regexp:(.\.||)(metatrader4|metatrader5|mql5|mycard520)\.(club|cn|co.jp|co.kr|co.ol|com|com.cn|com.tw|de|eu|fr|hk|info|jp|me|net|org|ru|top|tv|tw)","regexp:(.\.||)(360|rising|kingsoft|duba|xindubawukong|jinshanduba|guanjia.qq|m.qq|lbsyun.baidu|api.map.baidu)\.(cn|com|com.cn|net|org)","regexp:(.\.||)(cyberpolice|110.qq|12377|12315|12321)\.(cn|com|com.cn|net)","regexp:(^.@)(guerrillamail|guerrillamailblock|sharklasers|grr|pokemail|spam4|bccto|chacuo|027168).(info|biz|com|de|net|org|me|la)","regexp:(torrent|\.torrent|peer_id=|info_hash|get_peers|find_node|BitTorrent|announce_peer|announce\.php\?passkey=)","regexp:(.?)(xunlei|sandai|Thunder|XLLiveUD|IDM|IDMan)(.)","*.so.com"],"outboundTag":"block"},{"type":"field","protocol":["bittorrent","thunder","e2dk"],"outboundTag":"block"}]},"policy":{"levels":{"0":{"handshake":4,"connIdle":300,"uplinkOnly":5,"downlinkOnly":30,"statsUserUplink":true,"statsUserDownlink":true}}}}

客户端配置: clash,shadowrocket 等

请附上出错时软件输出的错误日志

服务器端错误日志: 无异常

客户端错误日志: 无异常

请附上访问日志

// 在这里附上服务器端日志

访问日志未发现异常 Snipaste_2022-05-30_13-04-13

kscooo commented 2 years ago

可以打一下 pprof,定位一下

betaxab commented 2 years ago

不知道如何使用pprof

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 120 days with no activity. Remove stale label or comment or this will be closed in 5 days