[GH-ISSUE #2733] 问个关于链接时间和cache缓存占用的问题 #2182

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

Originally created by @wudidehuangtiandi on GitHub (Jan 4, 2022).
Original GitHub issue: https://github.com/fatedier/frp/issues/2733

Describe the feature request

这个问题并不一定是frp的问题,也可能是服务器设置问题,不过这个现象会在链接时触发,想问问各位有没有遇到过的
正常穿透链接时间大概5秒左右

占用缓存如下
image

此时清理
image

可见cache内存不在占用,打开另一个链接
image

连接中,这时候会链接成功变得特别缓慢,从第一个链接中可见缓存肉眼可见的上升
image

想问下frp和cache内存的占用有什么联系没

Describe alternatives you've considered

No response

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @wudidehuangtiandi on GitHub (Jan 4, 2022). Original GitHub issue: https://github.com/fatedier/frp/issues/2733 ### Describe the feature request 这个问题并不一定是frp的问题,也可能是服务器设置问题,不过这个现象会在链接时触发,想问问各位有没有遇到过的 正常穿透链接时间大概5秒左右 >占用缓存如下 ![image](https://user-images.githubusercontent.com/54608929/147998774-631143fc-e7d7-4463-bfb6-8fe155bbfa72.png) >此时清理 ![image](https://user-images.githubusercontent.com/54608929/147998809-19c71b75-cc3a-4987-b620-d0cfb0d59f6c.png) >可见cache内存不在占用,打开另一个链接 ![image](https://user-images.githubusercontent.com/54608929/147998849-422beff1-0f92-48db-abc9-c7d75b301725.png) >连接中,这时候会链接成功变得特别缓慢,从第一个链接中可见缓存肉眼可见的上升 ![image](https://user-images.githubusercontent.com/54608929/147999000-eb8f850a-25f0-447d-bd42-fac2f8158b46.png) 想问下frp和cache内存的占用有什么联系没 ### Describe alternatives you've considered _No response_ ### Affected area - [ ] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [ ] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
Author
Owner

@wudidehuangtiandi commented on GitHub (Jan 4, 2022):

顺便还有个问题,刚开始frp链接可以保持很久,后来短时间不操作就会自动断开(xftp),不知道为啥- = 。

<!-- gh-comment-id:1004472355 --> @wudidehuangtiandi commented on GitHub (Jan 4, 2022): 顺便还有个问题,刚开始frp链接可以保持很久,后来短时间不操作就会自动断开(xftp),不知道为啥- = 。
Author
Owner

@wudidehuangtiandi commented on GitHub (Jan 4, 2022):

对了刚开始穿透也是秒传的,后来就算缓存好了也要大概四五秒,期间配置没做变化,只影响了ssh,顺便丢下配置文件,大佬看看有啥问题没
服务端

[common]
bind_port = 7000
vhost_https_port = 443

客户端

[common]
server_addr = xx.xx.xx.xx
server_port = 7000

[ssh]
type = tcp
local_ip = 127.0.0.1
local_port = 22
remote_port = 6000

[nginx]
type = tcp
local_ip = 127.0.0.1
local_port = 80
remote_port = 80

[nacos]
type = tcp
local_ip = 127.0.0.1
local_port = 8848
remote_port = 8848

[nacos-grpc]
type = tcp
local_ip = 127.0.0.1
local_port = 9848
remote_port = 9848


[minio]
type = tcp
local_ip = 127.0.0.1
local_port = 9000
remote_port = 9000

[minio_api]
type = tcp
local_ip = 127.0.0.1
local_port = 9001
remote_port = 9001

[tomcat]
type = tcp
local_ip = 127.0.0.1
local_port = 8080
remote_port = 8080

[mysql]
type = tcp
local_ip = 127.0.0.1
local_port = 3306
remote_port = 3306

[redis]
type = tcp
local_ip = 127.0.0.1
local_port = 6379
remote_port = 6379

[https]
type = https
custom_domains = xxxxxxxxxxxxxx

plugin = https2http
plugin_local_addr = 127.0.0.1:9001

# HTTPS 证书相关的配置
plugin_crt_path = ./xxxxxxx.crt
plugin_key_path = ./xxxxxxx.key
plugin_host_header_rewrite = 127.0.0.1
plugin_header_X-From-Where = frp

<!-- gh-comment-id:1004477347 --> @wudidehuangtiandi commented on GitHub (Jan 4, 2022): 对了刚开始穿透也是秒传的,后来就算缓存好了也要大概四五秒,期间配置没做变化,只影响了ssh,顺便丢下配置文件,大佬看看有啥问题没 服务端 ``` [common] bind_port = 7000 vhost_https_port = 443 ``` 客户端 ``` [common] server_addr = xx.xx.xx.xx server_port = 7000 [ssh] type = tcp local_ip = 127.0.0.1 local_port = 22 remote_port = 6000 [nginx] type = tcp local_ip = 127.0.0.1 local_port = 80 remote_port = 80 [nacos] type = tcp local_ip = 127.0.0.1 local_port = 8848 remote_port = 8848 [nacos-grpc] type = tcp local_ip = 127.0.0.1 local_port = 9848 remote_port = 9848 [minio] type = tcp local_ip = 127.0.0.1 local_port = 9000 remote_port = 9000 [minio_api] type = tcp local_ip = 127.0.0.1 local_port = 9001 remote_port = 9001 [tomcat] type = tcp local_ip = 127.0.0.1 local_port = 8080 remote_port = 8080 [mysql] type = tcp local_ip = 127.0.0.1 local_port = 3306 remote_port = 3306 [redis] type = tcp local_ip = 127.0.0.1 local_port = 6379 remote_port = 6379 [https] type = https custom_domains = xxxxxxxxxxxxxx plugin = https2http plugin_local_addr = 127.0.0.1:9001 # HTTPS 证书相关的配置 plugin_crt_path = ./xxxxxxx.crt plugin_key_path = ./xxxxxxx.key plugin_host_header_rewrite = 127.0.0.1 plugin_header_X-From-Where = frp ```
Author
Owner

@fatedier commented on GitHub (Jan 4, 2022):

可以用 top -p {pid} 查看单个进程的情况。

<!-- gh-comment-id:1004487050 --> @fatedier commented on GitHub (Jan 4, 2022): 可以用 `top -p {pid}` 查看单个进程的情况。
Author
Owner

@wudidehuangtiandi commented on GitHub (Jan 4, 2022):

破案了,被人扫描了ssh端口导致产生了4G登录错误的日志。

<!-- gh-comment-id:1004752159 --> @wudidehuangtiandi commented on GitHub (Jan 4, 2022): 破案了,被人扫描了ssh端口导致产生了4G登录错误的日志。
Author
Owner

@wudidehuangtiandi commented on GitHub (Jan 4, 2022):

经过排查,扫的是frp的6000端口,出名了呀看来被人盯上了,建议各位不要用6000端口

<!-- gh-comment-id:1004783053 --> @wudidehuangtiandi commented on GitHub (Jan 4, 2022): 经过排查,扫的是frp的6000端口,出名了呀看来被人盯上了,建议各位不要用6000端口
Author
Owner

@wudidehuangtiandi commented on GitHub (Jan 5, 2022):

111

<!-- gh-comment-id:1005272445 --> @wudidehuangtiandi commented on GitHub (Jan 5, 2022): 111
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#2182
No description provided.