Skip to content
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

Too many open files in system BUG #545

Closed
dgben2015 opened this issue Nov 30, 2017 · 3 comments
Closed

Too many open files in system BUG #545

dgben2015 opened this issue Nov 30, 2017 · 3 comments
Labels

Comments

@dgben2015
Copy link

dgben2015 commented Nov 30, 2017

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)?

[root@localhost ~]# frps -v
Frps version 0.13.0

[root@LNMP frp_0.13.0_linux_amd64]# ./frpc -v
0.13.0

What operating system and processor architecture are you using (go env)?

Frps:

[root@localhost ~]# cat /proc/version
Linux version 2.6.32-696.13.2.el6.x86_64 (mockbuild@c1bl.rdu2.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-18) (GCC) ) #1 SMP Thu Oct 5 21:22:16 UTC 2017

frpc:

[root@LNMP frp_0.13.0_linux_amd64]# cat /proc/version
Linux version 2.6.32-642.el6.x86_64 (mockbuild@worker1.bsys.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-17) (GCC) ) #1 SMP Tue May 10 17:27:01 UTC 2016

Configures you used:
FRPS:

[common]
bind_addr = 0.0.0.0
bind_port = 61122
dashboard_port = 61188

dashboard_user = admin
dashboard_pwd = xxx

vhost_http_port = 61180
vhost_https_port = 61443

log_file = /dev/null

log_level = info
log_max_days = 1

privilege_token = xxx

#privilege_allow_ports = 1-65535

max_pool_count = 2000

tcp_mux = true

FRPC:

[common]
server_addr = xxx
server_port = 61122

log_file = ./frpc.log

log_level = info

log_max_days = 1

privilege_token = xxxxx

admin_addr = 127.0.0.1
admin_port = 7400
admin_user = admin
admin_pwd = admin

pool_count = 500
tcp_mux = true
user = xx
protocol = tcp

[W1]
type = http
local_ip = 127.0.0.1
local_port = 80
use_encryption = true
use_compression = true
custom_domains = xx1.com

[W2]
type = http
local_ip = 127.0.0.1
local_port = 80
use_encryption = true
use_compression = true
custom_domains = xx2.com

Steps to reproduce the issue:

1.业务需求: 转发 内部授权系统(FRPC)到公网(FRPS), 客户端 大约 20 个,每个客户端 五秒请求一次
2.运行半个月后 FRPS服务器上的Tomcat 日志提示 "Too many open files in system" ;
3. 使用 lsof -n|awk '{print $2}'|sort|uniq -c |sort -nr|more 查看 进程文件打开数量,发现frps进程 有 六万多 ,导致同服务器(FRPS) 上其他应用无法创建新的链接,触发系统报警.
4.目前解决办法:定时重启frps 期待修复该问题

Describe the results you expected:

请求次数再多也不影响系统

Additional information you deem important (e.g. issue happens only occasionally):

FRPS 服务器 Linux 系统已经 不限制 文件句柄打开数量

[root@localhost ~]# cat /proc/sys/fs/file-max
65535

[root@localhost ~]# ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 128269
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 65535
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 65535
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited

Can you point out what caused this issue (optional)

@dgben2015
Copy link
Author

该问题在 FRPC掉线(系统断电) ,但客户端 仍然在请求FRPS 时 ,可以 重现

@fatedier
Copy link
Owner

fatedier commented Dec 7, 2017

贴一下更详细的网络连接信息。

ss, lsof 或者 netstat,处于各种状态的连接分别有多少之类的数据。

@sunyongke
Copy link

我也是出现了这个问题。内部假设了一个sharelatex,这个软件好像和服务器之间每个一段时间要通讯一次,目前基本只有我一个人在用。服务器基本没2天就会出现too many open files 提示。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants