-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Memory leak #3221
Comments
heap.zip |
@er888kh |
same problem , in my experience , version 1.8.4 is fine , and after that version , xray will leak |
麻烦逐个测试 v1.8.4 至 v1.8.6 之间的 commits,看一下哪个 commit 出现该问题 @er888kh 你那边也是这样吗? |
From this pprof, the biggest is at readv reader with 220MB. Although I'm not sure if this is indeed a leak. Can you profile a bigger usage? (Or reduce the buffer size to isolate the issue) |
Same issue on MT7981A (ARM64, cortex A53) with 512MB RAM, have try 1.8.4 and 1.8.10, both consume all RAM on device after first speedtest running and hangs, switch to sing-box 1.8.10 without change anything on server side (xray-core 1.8.10) and have no issues with memory consumption (~180 MB RAM after 10 and more tests). P.S. |
Same problem when running speedtest with chain-proxy config and using Xray-Core |
Same problem |
There is / has been a memory leak issue since at least version 1.8.9. I have tested the latest release, and it is leaking at a rate of about 1.7 GB for every 100 GB of traffic proxied, during a time frame of 24 hours and with 50 active users. I have not done experiments to correlate these numbers with each other, but it seems like the amount of leaked memory is proportional to the served traffic. There is also no ceiling to this, it just grows until
systemd-oomd
kills it. I have tried usingvless only
,vless+vmess
andvless+trojan
, and avoided the newly added transports but to no avail. I would be more than happy to experiment more and provide the team with more information. I am runningxray
behindhaproxy
and that behind cloudflare CDN.OS:
Ubuntu 22.04
, all packages up-to-date.Architecture:
Armv8
, Neoverse-N1 at Hetzner. Also genericx86
platforms.Memory: 4GB
Kernel:
Generic Ubuntu 5.15.0-xxx
Logging: Disabled
The text was updated successfully, but these errors were encountered: