[GH-ISSUE #4802] 内存泄露(TCP连接未正确关闭?) #3791

Closed
opened 2026-05-05 14:25:38 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @dishpzga on GitHub (May 20, 2025).
Original GitHub issue: https://github.com/fatedier/frp/issues/4802

Bug Description

我的frp服务器 版本 0.46.1,客户端版本 0.25.3,现在有1500个客户端 代理了4500个TCP端口,周期性的出现TCP连接数暴涨和32G内存一两周内耗尽,监控信息如下图

Image

Image

frpc Version

0.25.3

frps Version

0.46.1

System Architecture

linux/amd64

Configurations

frps.ini:

[common]
bind_addr = 0.0.0.0
bind_port = 7000
bind_udp_port = 7001
privilege_token = xxxx123

dashboard_addr = 0.0.0.0
dashboard_port = 7500
dashboard_user = xxxx
dashboard_pwd = xxxxxx

vhost_http_port = 60000
vhost_https_port = 60001
vhost_http_timeout = 3000

log_file = /tmp/frps.log
log_level = debug
log_max_days = 10

allow_ports = 30000-49999

heartbeat_timeout = 30
#idle_timeout = 300
max_pool_count = 20000
tcp_mux = true

subdomain_host = xxxx.com

frpc.ini:

[common]
server_addr = x.x.x.x
server_port = 7000
log_file = /tmp/frpc.log
log_level = info
log_max_days = 2
privilege_token = xxxx123

user = test
tls_enable = true
[ssh]
type = tcp
local_ip = 127.0.0.1
local_port = 22
remote_port = 0
use_compression = true

[tcp_5000]
type = tcp
local_ip = 127.0.0.1
local_port = 5000
remote_port = 0
use_compression = true

[tcp_5001]
type = tcp
local_ip = 127.0.0.1
local_port = 5001
remote_port = 0
use_compression = true

Logs

No response

Steps to reproduce

...

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @dishpzga on GitHub (May 20, 2025). Original GitHub issue: https://github.com/fatedier/frp/issues/4802 ### Bug Description 我的frp服务器 版本 0.46.1,客户端版本 0.25.3,现在有1500个客户端 代理了4500个TCP端口,周期性的出现TCP连接数暴涨和32G内存一两周内耗尽,监控信息如下图 ![Image](https://github.com/user-attachments/assets/93b92f70-533b-4f1b-8d25-ef94183792a0) ![Image](https://github.com/user-attachments/assets/c9008f41-9ffa-40e5-b526-6a33f2669401) ### frpc Version 0.25.3 ### frps Version 0.46.1 ### System Architecture linux/amd64 ### Configurations **frps.ini:** [common] bind_addr = 0.0.0.0 bind_port = 7000 bind_udp_port = 7001 privilege_token = xxxx123 dashboard_addr = 0.0.0.0 dashboard_port = 7500 dashboard_user = xxxx dashboard_pwd = xxxxxx vhost_http_port = 60000 vhost_https_port = 60001 vhost_http_timeout = 3000 log_file = /tmp/frps.log log_level = debug log_max_days = 10 allow_ports = 30000-49999 heartbeat_timeout = 30 #idle_timeout = 300 max_pool_count = 20000 tcp_mux = true subdomain_host = xxxx.com **frpc.ini:** [common] server_addr = x.x.x.x server_port = 7000 log_file = /tmp/frpc.log log_level = info log_max_days = 2 privilege_token = xxxx123 user = test tls_enable = true [ssh] type = tcp local_ip = 127.0.0.1 local_port = 22 remote_port = 0 use_compression = true [tcp_5000] type = tcp local_ip = 127.0.0.1 local_port = 5000 remote_port = 0 use_compression = true [tcp_5001] type = tcp local_ip = 127.0.0.1 local_port = 5001 remote_port = 0 use_compression = true ### Logs _No response_ ### Steps to reproduce 1. 2. 3. ... ### Affected area - [ ] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [ ] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
gitea-mirror 2026-05-05 14:25:38 -06:00
Author
Owner

@XuruiPro commented on GitHub (May 23, 2025):

我代理的xtcp也出现了用netstat -an|findstr ESTABLISHED查询代理端口无线增多,增到后期就挂了要重启

<!-- gh-comment-id:2903016328 --> @XuruiPro commented on GitHub (May 23, 2025): 我代理的xtcp也出现了用netstat -an|findstr ESTABLISHED查询代理端口无线增多,增到后期就挂了要重启
Author
Owner

@github-actions[bot] commented on GitHub (Jun 7, 2025):

Issues go stale after 14d of inactivity. Stale issues rot after an additional 3d of inactivity and eventually close.

<!-- gh-comment-id:2951319030 --> @github-actions[bot] commented on GitHub (Jun 7, 2025): Issues go stale after 14d of inactivity. Stale issues rot after an additional 3d of inactivity and eventually close.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/frp#3791
No description provided.