[GH-ISSUE #1199] 客户端连接失败反复重试导致内存占用过高 #942

Closed
opened 2026-05-05 12:35:56 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @VMatrices on GitHub (Apr 15, 2019).
Original GitHub issue: https://github.com/fatedier/frp/issues/1199

Originally assigned to: @blizard863 on GitHub.

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)?
v0.26.0

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

Configures you used:

[common]
token = abcdefg
server_addr = xxx.cn
server_port = 50000
pool_count = 5
#log_file = ./frpc.log
log_level = info
log_max_days = 3
admin_addr = 127.0.0.1
admin_port = 7500
admin_user = admin
admin_pwd = 123

[xxx_out]
type = tcp
local_ip = 127.0.0.1
local_port = 3389
remote_port = 55023

[xxx_in]
type = tcp
local_ip = 172.16.0.28
local_port = 10011
remote_port = 55025

Steps to reproduce the issue:
外部条件: 带有网络审查的环境

  1. 启动客户端
  2. 等待一段时间(可能好几天)

Describe the results you received:
客户端主机卡死,内存占用过高

Describe the results you expected:
客户端内存占用正常,不影响宿主机器

Additional information you deem important (e.g. issue happens only occasionally):
客户端内存占用情况,最多时占用约2G
image

部分日志(重连间隔时间非常短):


2019/04/15 09:39:24 [I] [service.go:221] login to server success, get run id [f46dc9c537a3e5d1], server udp port [50001]
2019/04/15 09:39:24 [I] [proxy_manager.go:137] [f46dc9c537a3e5d1] proxy added: [juminfo_out juminfo_in]
2019/04/15 09:39:24 [I] [control.go:228] control writer is closing
2019/04/15 09:39:24 [I] [service.go:127] try to reconnect to server...
2019/04/15 09:39:24 [E] [control.go:127] work connection closed, EOF
2019/04/15 09:39:24 [I] [service.go:221] login to server success, get run id [f46dc9c537a3e5d1], server udp port [50001]
2019/04/15 09:39:24 [I] [proxy_manager.go:137] [f46dc9c537a3e5d1] proxy added: [juminfo_out juminfo_in]
2019/04/15 09:39:24 [I] [control.go:228] control writer is closing
2019/04/15 09:39:24 [I] [service.go:127] try to reconnect to server...
2019/04/15 09:39:24 [E] [control.go:127] work connection closed, EOF
2019/04/15 09:39:24 [I] [service.go:221] login to server success, get run id [f46dc9c537a3e5d1], server udp port [50001]
2019/04/15 09:39:24 [I] [proxy_manager.go:137] [f46dc9c537a3e5d1] proxy added: [juminfo_out juminfo_in]
2019/04/15 09:39:24 [E] [control.go:127] work connection closed, EOF
2019/04/15 09:39:24 [I] [control.go:228] control writer is closing
2019/04/15 09:39:24 [I] [service.go:127] try to reconnect to server...
2019/04/15 09:39:24 [I] [service.go:221] login to server success, get run id [f46dc9c537a3e5d1], server udp port [50001]
2019/04/15 09:39:24 [I] [proxy_manager.go:137] [f46dc9c537a3e5d1] proxy added: [juminfo_in juminfo_out]
2019/04/15 09:39:24 [E] [control.go:127] work connection closed, EOF
2019/04/15 09:39:24 [I] [control.go:228] control writer is closing
2019/04/15 09:39:24 [I] [service.go:127] try to reconnect to server...
2019/04/15 09:39:24 [I] [service.go:221] login to server success, get run id [f46dc9c537a3e5d1], server udp port [50001]
2019/04/15 09:39:24 [I] [proxy_manager.go:137] [f46dc9c537a3e5d1] proxy added: [juminfo_in juminfo_out]
2019/04/15 09:39:24 [I] [control.go:228] control writer is closing
2019/04/15 09:39:24 [E] [control.go:127] work connection closed, EOF
2019/04/15 09:39:24 [I] [service.go:127] try to reconnect to server...

问题类似:
Issues 1178

Originally created by @VMatrices on GitHub (Apr 15, 2019). Original GitHub issue: https://github.com/fatedier/frp/issues/1199 Originally assigned to: @blizard863 on GitHub. 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)?** v0.26.0 **What operating system and processor architecture are you using (`go env`)?** Windows 10 x64 **Configures you used:** ``` [common] token = abcdefg server_addr = xxx.cn server_port = 50000 pool_count = 5 #log_file = ./frpc.log log_level = info log_max_days = 3 admin_addr = 127.0.0.1 admin_port = 7500 admin_user = admin admin_pwd = 123 [xxx_out] type = tcp local_ip = 127.0.0.1 local_port = 3389 remote_port = 55023 [xxx_in] type = tcp local_ip = 172.16.0.28 local_port = 10011 remote_port = 55025 ``` **Steps to reproduce the issue:** 外部条件: 带有网络审查的环境 1. 启动客户端 2. 等待一段时间(可能好几天) **Describe the results you received:** 客户端主机卡死,内存占用过高 **Describe the results you expected:** 客户端内存占用正常,不影响宿主机器 **Additional information you deem important (e.g. issue happens only occasionally):** 客户端内存占用情况,最多时占用约2G ![image](https://user-images.githubusercontent.com/24680533/56104028-63f8d480-5f68-11e9-8adf-e99e54945dc4.png) 部分日志(重连间隔时间非常短): ``` 2019/04/15 09:39:24 [I] [service.go:221] login to server success, get run id [f46dc9c537a3e5d1], server udp port [50001] 2019/04/15 09:39:24 [I] [proxy_manager.go:137] [f46dc9c537a3e5d1] proxy added: [juminfo_out juminfo_in] 2019/04/15 09:39:24 [I] [control.go:228] control writer is closing 2019/04/15 09:39:24 [I] [service.go:127] try to reconnect to server... 2019/04/15 09:39:24 [E] [control.go:127] work connection closed, EOF 2019/04/15 09:39:24 [I] [service.go:221] login to server success, get run id [f46dc9c537a3e5d1], server udp port [50001] 2019/04/15 09:39:24 [I] [proxy_manager.go:137] [f46dc9c537a3e5d1] proxy added: [juminfo_out juminfo_in] 2019/04/15 09:39:24 [I] [control.go:228] control writer is closing 2019/04/15 09:39:24 [I] [service.go:127] try to reconnect to server... 2019/04/15 09:39:24 [E] [control.go:127] work connection closed, EOF 2019/04/15 09:39:24 [I] [service.go:221] login to server success, get run id [f46dc9c537a3e5d1], server udp port [50001] 2019/04/15 09:39:24 [I] [proxy_manager.go:137] [f46dc9c537a3e5d1] proxy added: [juminfo_out juminfo_in] 2019/04/15 09:39:24 [E] [control.go:127] work connection closed, EOF 2019/04/15 09:39:24 [I] [control.go:228] control writer is closing 2019/04/15 09:39:24 [I] [service.go:127] try to reconnect to server... 2019/04/15 09:39:24 [I] [service.go:221] login to server success, get run id [f46dc9c537a3e5d1], server udp port [50001] 2019/04/15 09:39:24 [I] [proxy_manager.go:137] [f46dc9c537a3e5d1] proxy added: [juminfo_in juminfo_out] 2019/04/15 09:39:24 [E] [control.go:127] work connection closed, EOF 2019/04/15 09:39:24 [I] [control.go:228] control writer is closing 2019/04/15 09:39:24 [I] [service.go:127] try to reconnect to server... 2019/04/15 09:39:24 [I] [service.go:221] login to server success, get run id [f46dc9c537a3e5d1], server udp port [50001] 2019/04/15 09:39:24 [I] [proxy_manager.go:137] [f46dc9c537a3e5d1] proxy added: [juminfo_in juminfo_out] 2019/04/15 09:39:24 [I] [control.go:228] control writer is closing 2019/04/15 09:39:24 [E] [control.go:127] work connection closed, EOF 2019/04/15 09:39:24 [I] [service.go:127] try to reconnect to server... ``` _问题类似:_ [Issues 1178](https://github.com/fatedier/frp/issues/1178)
gitea-mirror 2026-05-05 12:35:56 -06:00
Author
Owner

@fatedier commented on GitHub (Mar 29, 2020):

@bingtianbaihua 可以测试下目前是否仍然会有问题。当 frpc 和 frps 连接建立成功,frps 立马断开连接后,frpc 的资源消耗情况。

如果有问题,可以考虑对连续登陆的情况也加上速率限制,目前只对登陆失败的重试会延长重试间隔。

<!-- gh-comment-id:605637802 --> @fatedier commented on GitHub (Mar 29, 2020): @bingtianbaihua 可以测试下目前是否仍然会有问题。当 frpc 和 frps 连接建立成功,frps 立马断开连接后,frpc 的资源消耗情况。 如果有问题,可以考虑对连续登陆的情况也加上速率限制,目前只对登陆失败的重试会延长重试间隔。
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#942
No description provided.