-
-
Notifications
You must be signed in to change notification settings - Fork 13.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
accept4: too many open files大访问量时frps无响应,重启frps才恢复正常 #752
Comments
是不是文件句柄有泄露?还是说默认的限制太小了? |
建议通过网络工具,排查下 frps 相关的连接。 |
Linux frp 2.6.32-042stab127.2 #1 SMP Thu Jan 4 16:41:44 MSK 2018 x86_64 x86_64 x86_64 GNU/Linux |
写错了, |
core file size (blocks, -c) 0 |
建议先参考搜索引擎上的资料,尝试对服务器的系统参数做一些调优。 |
ulimit -a修改下下面这个系统参数试试 |
@bob4jcom 谢谢建议。我已修改。等我测试一两天看看问题是否修复。 |
测试通过,问题似乎已经解决 |
I have the same "too many open files; retrying in 1s" problem, is it possible to limit the max connections that frps open to frpc ? |
ps -ef | grep frps |
Issue is only used for submiting bug report and documents typo. If there are same issues or answers can be found in documents, we will close it directly.
(为了节约时间,提高处理问题的效率,不按照格式填写的 issue 将会直接关闭。)
Use the commands below to provide key information from your environment:
You do NOT have to include this information if this is a FEATURE REQUEST
What version of frp are you using (./frpc -v or ./frps -v)?
1.8
What operating system and processor architecture are you using (
go env
)?Ubuntu 16.04.4 LTS X64
Configures you used:
为了安全,关键信息用xxx替代
一共10个通道,就不一一列举,总之只涉及到http、https和tcp类型,格式如上
Steps to reproduce the issue:
1.正常启动frpc和frps
2.大量用户访问http服务,大约一个白天时间
3.期间可能也伴随着小量https或tcp传输
Describe the results you received:
晚上测试发现frps虽然正在运行却无法访问,查看log报错为
2018/05/03 22:36:43 http: Accept error: accept tcp [::]:80: accept4: too many open files; retrying in 1s
不得不killall frps关闭,然后重新打开frps。
frpc设置了每隔一分钟检测,断线重连。所以frps重启后就可以自动连接正常。
脚本如下:
如果frpc连接失败就会退出。每分钟执行一次脚本。如果frpc退出了进程数量小于1,就会启动frpc
Describe the results you expected:
frps正常运行而无需定时重启。
Additional information you deem important (e.g. issue happens only occasionally):
这个问题让人头疼。希望可以解决。
Can you point out what caused this issue (optional)
我怀疑是不是并发数量有限导致的问题?比如我同时可能有几百到几千的http访问。
The text was updated successfully, but these errors were encountered: