[GH-ISSUE #2275] 高并发 多连接下服务停止 #1807

Closed
opened 2026-05-05 13:10:01 -06:00 by gitea-mirror · 4 comments
Owner

Originally created by @getliuyue on GitHub (Mar 3, 2021).
Original GitHub issue: https://github.com/fatedier/frp/issues/2275

我把客户端的mysql通过frp让外网连接,在高并发、多连接下(具体最多没有试过,刷新frp仪表盘显示在大约到800-900左右就会停止)
一分钟左右就会自动停止。
服务端的端口也会停止监听
但是只有高并发的[mysql]会停止,其他的不会停止,比如[phpmyadmin]
必须通过重启
pkill frpc
./frpc -c frpc.ini
来解决,但是过一分钟又停止了!

服务端配置如下

[common]
bind_port = 60540
vhost_tcp_port = 65000
vhost_tcp_port = 6888
vhost_tcp_port = 63306
token = 1814
subdomain_host = ********
server_addr = ********

客户端配置如下

[common]
server_addr = 112.*.**.***
server_port = 60540
token = 1814
log_level = trace

[mysql]
type = tcp
local_ip = 192.168.31.86
local_port = 3306
remote_port = 63306
token = 1814

[phpmyadmin]
type = tcp
local_ip = 192.168.31.86
local_port = 888
remote_port = 6888
token = 1814

日志如下

2021/03/03 21:51:36 [D] [proxy.go:805] [7ce9c8e72fa9f086] [mysql] join connections closed
2021/03/03 21:51:36 [D] [proxy.go:805] [7ce9c8e72fa9f086] [mysql] join connections closed
2021/03/03 21:51:36 [D] [proxy.go:805] [7ce9c8e72fa9f086] [mysql] join connections closed
2021/03/03 21:51:36 [D] [proxy.go:805] [7ce9c8e72fa9f086] [mysql] join connections closed
2021/03/03 21:51:36 [D] [proxy.go:805] [7ce9c8e72fa9f086] [mysql] join conneations closed
2021/03/03 21:51:36 [D] [proxy.go:805] [7ce9c8e72fa9f086] [mysql] join connections closed
2021/03/03 21:51:36 [D] [proxy.go:805] [7ce9c8e72fa9f086] [mysql] join connections closed
2021/03/03 21:51:36 [D] [proxy.go:805] [7ce9c8e72fa9£086] [mysql] join connections closed
2021/03/03 21:51:36 [D] [proxy.go:805] [7ce9c8e72fa9£086] [mysql] join conneations closed
2021/03/03 21:51:36 [D] [proxy.go:805] [7ce9c8e72fa9f086] [mysql] join connections closed 
2021/03/03 21:51:36 [D] [proxy.go:805] [7ce9c8e72fa9f086] [mysql] join connections closed
2021/03/03 21:51:36 [D] [proxy.go:805] [7ce9c8e72fa9£086] [mysql] join connections closed
2021/03/03 21:51:36 [E] [control.go:158] [7ce9c8e72fa9£086] work conneation closed before response StartWorkConn message: EOF
2021/03/03 21:51:36 [D] [proxy.go:805] [7ce9c8e72fa9f086] [mysql] join connections closed
2021/03/03 21:51:36 [D] [proxy.go:805] [7ce9c8e72fa9f086] [mysql] join connections closed
2021/03/03 21:51:36 [D] [proxy.go :805] [7ce9c8e72fa9f086] [mysql] join connections closed
2021/03/03 21:51:36 [D] [proxy.go:805] [7ce9c8e72fa9£086] [mysql] join connections closed
2021/03/03 21:51:36 [E] [control.go:158] [7ce9c8e72fa9f086] work connection closed before response StartWorkconn message: EOF
2021/03/03 21:51:36 [D] [proxy.go:805] [7ce9c8e72fa9f086] [mysql] join conneations closed
Originally created by @getliuyue on GitHub (Mar 3, 2021). Original GitHub issue: https://github.com/fatedier/frp/issues/2275 我把客户端的mysql通过frp让外网连接,在高并发、多连接下(具体最多没有试过,刷新frp仪表盘显示在大约到800-900左右就会停止) 一分钟左右就会自动停止。 服务端的端口也会停止监听 但是只有高并发的[mysql]会停止,其他的不会停止,比如[phpmyadmin] 必须通过重启 `pkill frpc` `./frpc -c frpc.ini` 来解决,但是过一分钟又停止了! 服务端配置如下 ``` [common] bind_port = 60540 vhost_tcp_port = 65000 vhost_tcp_port = 6888 vhost_tcp_port = 63306 token = 1814 subdomain_host = ******** server_addr = ******** ``` 客户端配置如下 ``` [common] server_addr = 112.*.**.*** server_port = 60540 token = 1814 log_level = trace [mysql] type = tcp local_ip = 192.168.31.86 local_port = 3306 remote_port = 63306 token = 1814 [phpmyadmin] type = tcp local_ip = 192.168.31.86 local_port = 888 remote_port = 6888 token = 1814 ``` 日志如下 ``` 2021/03/03 21:51:36 [D] [proxy.go:805] [7ce9c8e72fa9f086] [mysql] join connections closed 2021/03/03 21:51:36 [D] [proxy.go:805] [7ce9c8e72fa9f086] [mysql] join connections closed 2021/03/03 21:51:36 [D] [proxy.go:805] [7ce9c8e72fa9f086] [mysql] join connections closed 2021/03/03 21:51:36 [D] [proxy.go:805] [7ce9c8e72fa9f086] [mysql] join connections closed 2021/03/03 21:51:36 [D] [proxy.go:805] [7ce9c8e72fa9f086] [mysql] join conneations closed 2021/03/03 21:51:36 [D] [proxy.go:805] [7ce9c8e72fa9f086] [mysql] join connections closed 2021/03/03 21:51:36 [D] [proxy.go:805] [7ce9c8e72fa9f086] [mysql] join connections closed 2021/03/03 21:51:36 [D] [proxy.go:805] [7ce9c8e72fa9£086] [mysql] join connections closed 2021/03/03 21:51:36 [D] [proxy.go:805] [7ce9c8e72fa9£086] [mysql] join conneations closed 2021/03/03 21:51:36 [D] [proxy.go:805] [7ce9c8e72fa9f086] [mysql] join connections closed 2021/03/03 21:51:36 [D] [proxy.go:805] [7ce9c8e72fa9f086] [mysql] join connections closed 2021/03/03 21:51:36 [D] [proxy.go:805] [7ce9c8e72fa9£086] [mysql] join connections closed 2021/03/03 21:51:36 [E] [control.go:158] [7ce9c8e72fa9£086] work conneation closed before response StartWorkConn message: EOF 2021/03/03 21:51:36 [D] [proxy.go:805] [7ce9c8e72fa9f086] [mysql] join connections closed 2021/03/03 21:51:36 [D] [proxy.go:805] [7ce9c8e72fa9f086] [mysql] join connections closed 2021/03/03 21:51:36 [D] [proxy.go :805] [7ce9c8e72fa9f086] [mysql] join connections closed 2021/03/03 21:51:36 [D] [proxy.go:805] [7ce9c8e72fa9£086] [mysql] join connections closed 2021/03/03 21:51:36 [E] [control.go:158] [7ce9c8e72fa9f086] work connection closed before response StartWorkconn message: EOF 2021/03/03 21:51:36 [D] [proxy.go:805] [7ce9c8e72fa9f086] [mysql] join conneations closed ```
gitea-mirror 2026-05-05 13:10:01 -06:00
Author
Owner

@ax2009live commented on GitHub (Mar 3, 2021):

服务器端vhost_tcp_port 不需要指定端口吧?
token 不需要在frpc每个连接里设置吧、

感觉设置应该这个

服务端配置如下

[common]
bind_port = 60540
token = 1814
subdomain_host = ********
server_addr = ********

客户端配置如下

[common]
server_addr = 112.*.**.***
server_port = 60540
token = 1814
log_level = trace

[mysql]
type = tcp
local_ip = 192.168.31.86
local_port = 3306
remote_port = 63306
use_encryption = true
use_compression = true
#增加加密和压缩,不过这个应该跟那个问题没有关系

[phpmyadmin]
type = tcp
local_ip = 192.168.31.86
local_port = 888
remote_port = 6888
use_encryption = true
use_compression = true


要不加个健康检查看看,自动移除有问题的连接
[mysql]
type = tcp
local_ip = 192.168.31.86
local_port = 3306
remote_port = 63306
use_encryption = true
use_compression = true
#Enable TCP health check
health_check_type = tcp
#TCPing timeout seconds
health_check_timeout_s = 3
#If health check failed 3 times in a row, the proxy will be removed from frps
health_check_max_failed = 3
#A health check every 10 seconds
health_check_interval_s = 10
<!-- gh-comment-id:790041515 --> @ax2009live commented on GitHub (Mar 3, 2021): 服务器端vhost_tcp_port 不需要指定端口吧? token 不需要在frpc每个连接里设置吧、 感觉设置应该这个 ### 服务端配置如下 ```ini [common] bind_port = 60540 token = 1814 subdomain_host = ******** server_addr = ******** ``` 客户端配置如下 ```ini [common] server_addr = 112.*.**.*** server_port = 60540 token = 1814 log_level = trace [mysql] type = tcp local_ip = 192.168.31.86 local_port = 3306 remote_port = 63306 use_encryption = true use_compression = true #增加加密和压缩,不过这个应该跟那个问题没有关系 [phpmyadmin] type = tcp local_ip = 192.168.31.86 local_port = 888 remote_port = 6888 use_encryption = true use_compression = true 要不加个健康检查看看,自动移除有问题的连接 [mysql] type = tcp local_ip = 192.168.31.86 local_port = 3306 remote_port = 63306 use_encryption = true use_compression = true #Enable TCP health check health_check_type = tcp #TCPing timeout seconds health_check_timeout_s = 3 #If health check failed 3 times in a row, the proxy will be removed from frps health_check_max_failed = 3 #A health check every 10 seconds health_check_interval_s = 10 ```
Author
Owner

@getliuyue commented on GitHub (Mar 5, 2021):

服务器端vhost_tcp_port 不需要指定端口吧?
token 不需要在frpc每个连接里设置吧、

感觉设置应该这个

服务端配置如下

[common]
bind_port = 60540
token = 1814
subdomain_host = ********
server_addr = ********

客户端配置如下

[common]
server_addr = 112.*.**.***
server_port = 60540
token = 1814
log_level = trace

[mysql]
type = tcp
local_ip = 192.168.31.86
local_port = 3306
remote_port = 63306
use_encryption = true
use_compression = true
#增加加密和压缩,不过这个应该跟那个问题没有关系

[phpmyadmin]
type = tcp
local_ip = 192.168.31.86
local_port = 888
remote_port = 6888
use_encryption = true
use_compression = true


要不加个健康检查看看,自动移除有问题的连接
[mysql]
type = tcp
local_ip = 192.168.31.86
local_port = 3306
remote_port = 63306
use_encryption = true
use_compression = true
#Enable TCP health check
health_check_type = tcp
#TCPing timeout seconds
health_check_timeout_s = 3
#If health check failed 3 times in a row, the proxy will be removed from frps
health_check_max_failed = 3
#A health check every 10 seconds
health_check_interval_s = 10

感谢,但改了配置后还是会时不时停止,我直接装联通宽带了 有公网ip

<!-- gh-comment-id:791181876 --> @getliuyue commented on GitHub (Mar 5, 2021): > 服务器端vhost_tcp_port 不需要指定端口吧? > token 不需要在frpc每个连接里设置吧、 > > 感觉设置应该这个 > > ### 服务端配置如下 > ```ini > [common] > bind_port = 60540 > token = 1814 > subdomain_host = ******** > server_addr = ******** > ``` > > 客户端配置如下 > > ```ini > [common] > server_addr = 112.*.**.*** > server_port = 60540 > token = 1814 > log_level = trace > > [mysql] > type = tcp > local_ip = 192.168.31.86 > local_port = 3306 > remote_port = 63306 > use_encryption = true > use_compression = true > #增加加密和压缩,不过这个应该跟那个问题没有关系 > > [phpmyadmin] > type = tcp > local_ip = 192.168.31.86 > local_port = 888 > remote_port = 6888 > use_encryption = true > use_compression = true > > > 要不加个健康检查看看,自动移除有问题的连接 > [mysql] > type = tcp > local_ip = 192.168.31.86 > local_port = 3306 > remote_port = 63306 > use_encryption = true > use_compression = true > #Enable TCP health check > health_check_type = tcp > #TCPing timeout seconds > health_check_timeout_s = 3 > #If health check failed 3 times in a row, the proxy will be removed from frps > health_check_max_failed = 3 > #A health check every 10 seconds > health_check_interval_s = 10 > ``` 感谢,但改了配置后还是会时不时停止,我直接装联通宽带了 有公网ip
Author
Owner

@zsinba commented on GitHub (Mar 17, 2021):

这应该是我看的ISSUE里第三个反馈高并发(或者说是多连接)的情况下卡死的情况.
目前办法只能重启解决,没找到其他办法.
36.0今天在发布了,不知道会不会解决这个问题.

<!-- gh-comment-id:800827772 --> @zsinba commented on GitHub (Mar 17, 2021): 这应该是我看的ISSUE里第三个反馈高并发(或者说是多连接)的情况下卡死的情况. 目前办法只能重启解决,没找到其他办法. 36.0今天在发布了,不知道会不会解决这个问题.
Author
Owner

@github-actions[bot] commented on GitHub (May 2, 2021):

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

<!-- gh-comment-id:830715375 --> @github-actions[bot] commented on GitHub (May 2, 2021): Issues go stale after 45d of inactivity. Stale issues rot after an additional 10d 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#1807
No description provided.