[GH-ISSUE #3284] tcp mux unstable #2634

Closed
opened 2026-05-05 13:42:02 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @comicfans on GitHub (Feb 1, 2023).
Original GitHub issue: https://github.com/fatedier/frp/issues/3284

Bug Description

I'm using visitor to expose postgresql service running on remote machine to localhost by stcp/shared key/visitor
and connect it from localhost, when there's lots of connection, postgresql client quickly run into "connection refused"
or "server close connection" error, but if set tcp_mux = false (other config keeps exactly same), problem resolved.

frpc Version

0.46.1

frps Version

0.46.1

System Architecture

linux/amd64

Configurations

postgresql frpc config

[common]
server_addr = 127.0.0.1
server_port = 5412
token = xxx
admin_addr = 127.0.0.2
admin_port = 7400
tcp_mux = false             #  only this config resolve problem

[secret_postgres]
type = stcp
sk = xxx
local_ip = 127.0.0.1
local_port = 5432
use_encryption = true
use_compression = true

frps.ini (same as postgresql host)

[common]
bind_port = 5412
tcp_mux = false      # only this resolve problem
dashboard_addr = 127.0.0.1
dashboard_port = 7500
# dashboard's username and password are both optional
dashboard_user = xxx
dashboard_pwd = xxx

admin_addr = 127.0.0.1
admin_port = 7400
admin_user = xxx
admin_pwd = xxx

authentication_method = token
token = xxx
bind_udp_port = 5413

client visitor config

[common]
server_addr = xxxx
server_port = 5412
token = xxx
tcp_mux = false

[secret_postgres_visitor]
type = stcp
role = visitor
server_name = secret_postgres
sk = xxx
bind_addr = 127.0.0.2
bind_port = 5432
health_check_type = tcp
health_check_timeout_s = 60
health_check_max_failed = 100
health_check_interval_s = 10
use_encryption = true
use_compression = true

Logs

I got lots line of

[03f939cb48234fcd] [secret_postgres] get a user connection

because my postgresql makes lots of short connections (quickly open/close)

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 @comicfans on GitHub (Feb 1, 2023). Original GitHub issue: https://github.com/fatedier/frp/issues/3284 ### Bug Description I'm using visitor to expose postgresql service running on remote machine to localhost by stcp/shared key/visitor and connect it from localhost, when there's lots of connection, postgresql client quickly run into "connection refused" or "server close connection" error, but if set tcp_mux = false (other config keeps exactly same), problem resolved. ### frpc Version 0.46.1 ### frps Version 0.46.1 ### System Architecture linux/amd64 ### Configurations postgresql frpc config ``` [common] server_addr = 127.0.0.1 server_port = 5412 token = xxx admin_addr = 127.0.0.2 admin_port = 7400 tcp_mux = false # only this config resolve problem [secret_postgres] type = stcp sk = xxx local_ip = 127.0.0.1 local_port = 5432 use_encryption = true use_compression = true ``` frps.ini (same as postgresql host) ``` [common] bind_port = 5412 tcp_mux = false # only this resolve problem dashboard_addr = 127.0.0.1 dashboard_port = 7500 # dashboard's username and password are both optional dashboard_user = xxx dashboard_pwd = xxx admin_addr = 127.0.0.1 admin_port = 7400 admin_user = xxx admin_pwd = xxx authentication_method = token token = xxx bind_udp_port = 5413 ``` client visitor config ``` [common] server_addr = xxxx server_port = 5412 token = xxx tcp_mux = false [secret_postgres_visitor] type = stcp role = visitor server_name = secret_postgres sk = xxx bind_addr = 127.0.0.2 bind_port = 5432 health_check_type = tcp health_check_timeout_s = 60 health_check_max_failed = 100 health_check_interval_s = 10 use_encryption = true use_compression = true ``` ### Logs I got lots line of ```[03f939cb48234fcd] [secret_postgres] get a user connection``` because my postgresql makes lots of short connections (quickly open/close) ### Steps to reproduce 1. 2. 3. ... ### Affected area - [ ] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [X] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
Author
Owner

@comicfans commented on GitHub (Feb 3, 2023):

after two days testing, disable tcp mux can help resolving disconnection problem, but frp suffer from super slow speed problem during long run/ big transfer, I gave up trying .

<!-- gh-comment-id:1414585838 --> @comicfans commented on GitHub (Feb 3, 2023): after two days testing, disable tcp mux can help resolving disconnection problem, but frp suffer from super slow speed problem during long run/ big transfer, I gave up trying .
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#2634
No description provided.