snail007 / goproxy

🔥 Proxy is a high performance HTTP(S) proxies, SOCKS5 proxies,WEBSOCKET, TCP, UDP proxy server implemented by golang. Now, it supports chain-style proxies,nat forwarding in different lan,TCP/UDP port forwarding, SSH forwarding.Proxy是golang实现的高性能http,https,websocket,tcp,socks5代理服务器,支持内网穿透,链式代理,通讯加密,智能HTTP,SOCKS5代理,黑白名单,限速,限流量,限连接数,跨平台,KCP支持,认证API。
https://snail007.host900.com/goproxy/manual/zh/
GNU General Public License v3.0
15.86k stars 3.02k forks source link

I got a warning call too many open files and then can't connect to the reverse tcp proxy server #496

Closed seng96 closed 2 years ago

seng96 commented 2 years ago

Expected Behavior

client可以正常連線到reverse tcp proxy server

Current Behavior

client無法對server建立正常連線,server出現"too many open files"的warning

Possible Solution

Steps to Reproduce

  1. 達到一定量的user後就會出現上述狀況(差不多150個連線)

Context (Environment)

  1. proxy version is : v? goproxy_sdk_commercial-11.8
  2. full command is :? proxy tcp non tls
  3. system is : Raspbian GNU/Linux 11 (bullseye)
  4. full log is:
    2022/08/08 22:23:14.954532 WARN accept error: accept tcp [::]:10006: accept4: too many open files
    2022/08/08 22:57:32.030522 WARN accept error: accept tcp [::]:10006: accept4: too many open files
    2022/08/08 22:57:32.030811 WARN accept error: accept tcp [::]:10006: accept4: too many open files
    2022/08/08 22:57:32.030942 WARN accept error: accept tcp [::]:10006: accept4: too many open files
    2022/08/08 22:57:32.031068 WARN accept error: accept tcp [::]:10006: accept4: too many open files
    2022/08/08 22:57:32.031181 WARN accept error: accept tcp [::]:10006: accept4: too many open files
    2022/08/08 22:57:32.031289 WARN accept error: accept tcp [::]:10006: accept4: too many open files
    2022/08/08 22:57:32.031388 WARN accept error: accept tcp [::]:10006: accept4: too many open files
    2022/08/08 22:57:32.031490 WARN accept error: accept tcp [::]:10006: accept4: too many open files
    2022/08/08 22:57:32.031594 WARN accept error: accept tcp [::]:10006: accept4: too many open files
    2022/08/08 22:57:32.031708 WARN accept error: accept tcp [::]:10006: accept4: too many open files

Detailed Description

Possible Implementation