zhboner / realm

A network relay tool
MIT License
1.54k stars 285 forks source link

华硕路由运行大概1分钟就会资源耗尽 #72

Closed fyhong closed 2 years ago

fyhong commented 2 years ago

华硕ac68u等arm路由器运行一会就会出现以下提示,然后所有的基本命令都运行不了,只能重启路由解决 Segmentation fault

zephyrchien commented 2 years ago

可能是连接数太多,fd用完了。 #60 #38 #34

fyhong commented 2 years ago

我中转socks5后,打开youtube,20秒都不用就会出现Segmentation fault 但我用另一个rust的程序 https://github.com/cedric05/tcp-relay-rust 这个就一直没问题。运行一天都不会出问题

zephyrchien commented 2 years ago

realm实现了tcp零拷贝,每条连接额外消耗4个fd. 我估计是路由器设默认的limit太小了(realm启动的时候会打印fd limit)

btw, 看日志很快就能定位问题

fyhong commented 2 years ago

这是启动日志,只要我没数据连接它就不会挂,一有数据连进来,没多久就会出现Segmentation fault,然后我就必须要重启路由才能运行其他命令了

fd: soft=1024, hard=1024 log: level=off, output=stdout dns: mode=ipv4_and_ipv6, protocol=tcp+udp, min-ttl=0, max-ttl=86400, cache-size=32, servers=system inited: 0.0.0.0:2087 -> [game8.4pu.com:443]; options: send-proxy=false, send-proxy-version=2, accept-proxy=false, accept-proxy-timeout=5s; connect-timeout=5s, associate-timeout=30s;

zephyrchien commented 2 years ago

这是初始化信息。打开日志需要加--log-level参数,或者改配置文件,具体看文档

2022年6月18日(土) 午前0:49 fyhong @.***>:

这是启动日志

fd: soft=1024, hard=1024 log: level=off, output=stdout dns: mode=ipv4_and_ipv6, protocol=tcp+udp, min-ttl=0, max-ttl=86400, cache-size=32, servers=system inited: 0.0.0.0:2087 -> [game8.4pu.com:443]; options: send-proxy=false, send-proxy-version=2, accept-proxy=false, accept-proxy-timeout=5s; connect-timeout=5s, associate-timeout=30s;

— Reply to this email directly, view it on GitHub https://github.com/zhboner/realm/issues/72#issuecomment-1159009768, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMH47KR3UKQGJXC3HA4BBADVPSM7TANCNFSM5Y65VY7A . You are receiving this because you commented.Message ID: @.***>