[GH-ISSUE #3427] frpc reconnect memory leak #2745

Closed
opened 2026-05-05 13:46:04 -06:00 by gitea-mirror · 6 comments
Owner

Originally created by @hqs136413 on GitHub (Apr 26, 2023).
Original GitHub issue: https://github.com/fatedier/frp/issues/3427

Bug Description

linux system Power on,frpc start:
frpc process:
image

image
When an exception occurs in the network,the frpc is Always reconnected
2-3minutes after:
image
image
image

frpc Version

0.37.0

frps Version

0.37.0

System Architecture

linux/arm32

Configurations

[common]
tls_enable = true
server_addr = xxx
server_port = xxx
privilege_token = xxx
log_level = info
log_max_days = 3
protocol = tcp
log_file = /var/log/frpc.log
tcp_mux = true
login_fail_exit = false

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 @hqs136413 on GitHub (Apr 26, 2023). Original GitHub issue: https://github.com/fatedier/frp/issues/3427 ### Bug Description linux system Power on,frpc start: frpc process: ![image](https://user-images.githubusercontent.com/52150091/234449200-af1c2d87-b565-4de7-a777-addab2908e92.png) ![image](https://user-images.githubusercontent.com/52150091/234449355-5a2ef589-82b1-440a-90c1-f7077d9db7e1.png) When an exception occurs in the network,the frpc is Always reconnected 2-3minutes after: ![image](https://user-images.githubusercontent.com/52150091/234450309-072ed9f7-27bd-4e48-a5df-f55b96aad59b.png) ![image](https://user-images.githubusercontent.com/52150091/234450343-3f0be39d-cd3f-40fe-a1ba-04501a9f8d13.png) ![image](https://user-images.githubusercontent.com/52150091/234450358-191a6285-9b12-4afa-a18e-6a4fb9302e5d.png) ### frpc Version 0.37.0 ### frps Version 0.37.0 ### System Architecture linux/arm32 ### Configurations [common] tls_enable = true server_addr = xxx server_port = xxx privilege_token = xxx log_level = info log_max_days = 3 protocol = tcp log_file = /var/log/frpc.log tcp_mux = true login_fail_exit = false ### Logs _No response_ ### Steps to reproduce 1. 2. 3. ... ### Affected area - [ ] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [ ] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [X] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
gitea-mirror 2026-05-05 13:46:04 -06:00
Author
Owner

@hqs136413 commented on GitHub (Apr 26, 2023):

image

<!-- gh-comment-id:1522672569 --> @hqs136413 commented on GitHub (Apr 26, 2023): ![image](https://user-images.githubusercontent.com/52150091/234450757-a63dcd80-faef-448c-9b31-8e4247c7e348.png)
Author
Owner

@fatedier commented on GitHub (Apr 26, 2023):

First, update to the latest version.
Then, run this test for an extended period to observe if the memory usage continues to increase.
Two or three minutes are not sufficient for accurate results. It doesn't make any sense.

<!-- gh-comment-id:1522680515 --> @fatedier commented on GitHub (Apr 26, 2023): First, update to the latest version. Then, run this test for an extended period to observe if the memory usage continues to increase. Two or three minutes are not sufficient for accurate results. It doesn't make any sense.
Author
Owner

@hqs136413 commented on GitHub (Apr 26, 2023):

我们有长时间测试2-3天,一开始frpc进程占用4-5M,把网络断了几分钟后内存增加了2-3M,继续把网络断开,内存增加1-2M,当frpc进程内存增加到8-9M的时候,后面内存增加缓慢,网络断了一两天,也不过增加几百k,但是还是过一会累加4K左右。过一会继续累计4k。
image

<!-- gh-comment-id:1522689207 --> @hqs136413 commented on GitHub (Apr 26, 2023): 我们有长时间测试2-3天,一开始frpc进程占用4-5M,把网络断了几分钟后内存增加了2-3M,继续把网络断开,内存增加1-2M,当frpc进程内存增加到8-9M的时候,后面内存增加缓慢,网络断了一两天,也不过增加几百k,但是还是过一会累加4K左右。过一会继续累计4k。 ![image](https://user-images.githubusercontent.com/52150091/234453177-7af47eb5-3838-4782-a064-26021453c5e1.png)
Author
Owner

@hqs136413 commented on GitHub (Apr 26, 2023):

断开网络 ,frpc重连的时候,一开始内存增加很快,后面趋于平缓,一点点累加。

<!-- gh-comment-id:1522689590 --> @hqs136413 commented on GitHub (Apr 26, 2023): 断开网络 ,frpc重连的时候,一开始内存增加很快,后面趋于平缓,一点点累加。
Author
Owner

@hqs136413 commented on GitHub (Apr 26, 2023):

你好,之前看到frp0.32.1版本有修复frpc重连导致的内存泄露 #1722(https://github.com/fatedier/frp/pull/1722/commits/68118b08e2eddd0d17dd90049a816158fd89e485) ,我还遇到一个现象,网络一直正常的时候,frpc没有一直重连,内存也会慢慢增加一点。

<!-- gh-comment-id:1522710457 --> @hqs136413 commented on GitHub (Apr 26, 2023): 你好,之前看到frp0.32.1版本有修复frpc重连导致的内存泄露 #1722(https://github.com/fatedier/frp/pull/1722/commits/68118b08e2eddd0d17dd90049a816158fd89e485) ,我还遇到一个现象,网络一直正常的时候,frpc没有一直重连,内存也会慢慢增加一点。
Author
Owner

@github-actions[bot] commented on GitHub (May 27, 2023):

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

<!-- gh-comment-id:1565105494 --> @github-actions[bot] commented on GitHub (May 27, 2023): Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d 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#2745
No description provided.