yichya / luci-app-xray

(Almost) full feature Xray client for OpenWrt
Mozilla Public License 2.0
600 stars 513 forks source link

Which magic number should I use for 256M RAM device? #313

Closed hqvv closed 1 year ago

hqvv commented 1 year ago

I am experiencing OOM and system hang on my 256M RAM 360T7 router. I noticed the rlimit value for 128M ram is 44444444 55555555. and 300000000 333333333 for 512M ram device? Could you please advise which number should I use for 256M ram device? Just double the 128M value to 88888888 AAAAAAAA ? (There are only about 23M ram left at boot with Xray-core enable in this device)

Thanks again for your great works!

yichya commented 1 year ago

Just double the 128M value to 88888888 AAAAAAAA ?

I just picked some random numbers there. Those are just bytes so you can try increasing them until it becomes stable enough.

However these are hard limits for a process meaning that Xray will encounter fatal error: cannot allocate memory and exits if it reaches the limit. You may need to try a stricter limit on nofile.

hqvv commented 1 year ago

Thank you for your prompt reply and advice. The OOM issue was solved after changing the default ports policy to bypassed. I guess the issue was caused by large number of connections.

I will keep monitor if the problem was solved permanently.