Closed koala775 closed 4 months ago
@koala775 Sorry, the information you provided is not helpful to investigate this issue, please follow the issue template to provide enough information.
There are two proxy with the same zk address,so the two proxy have the same config.But have a strange phenomenon,one proxy have the process,but client can't connect and have a 30s timeout exception.The other proxy can connect.
The following information cannot be obtained from the issue description:
I believe that you are also a technical engineer, and it is impossible to guess the above information based on your own description.
1.The proxy have no error logs 2.The client throw a exception:Connection is not avaliable,request timeout after 30000ms. 3.server.yml:
mode:
type: Cluster
repository:
type: ZooKeeper
props:
namespace: proxy_mysql_cluster
server-lists: ip1:2181,ip2:2181,ip3:2181
retryIntervalmilliseconds: 5000
timeToLiveSeconds: 60
maxRetries: 29
operationTimeoutMilliseconds: 20000
rules:
- !AUTHORITY
users:
- root@%: root
- sharding@:sharding
provider:
type: ALL_PERMITTED
-!TRANSACTION
defaultType: XA
providerType: Atomikos
props:
max-connections-size-per-query: 100
kernel-executor-size: 2048
proxy-frontend-flush-threshold: 128
proxy-hint-enabled: false
sql-show: true
check-table-metadata-enabled: false
proxy-backend-query-fetch-size: -1
proxy-frontend-executor-size: 2048
proxy-backend-executor-suitable: OLTP
proxy-frontend-max-connections: 0
proxy-backend-driver-type: JDBC
proxy-mysgl-default-version: 8.0.9
proxy-default-port: 3307
Hi @koala775 After 192.168.1.1 fails to connect, and switches to 192.168.1.2, will the same problem occur after a certain period of time? From the known information, the timeout does not appear in the log of the proxy, but in the client, so this is likely to be caused by the configuration of the client connection pool. It is recommended that you investigate from the client side, or provide a demo project that can reproduce the problem.
Yes,we now try reproduce the problem. When switches to 192.168.1.2,doesn't occur the same problem with use DBeaver tool,but 192.168.1.1 still can't connect.
Instead of using DBeaver, what about through MySQL client or JDBC client? Because DBeaver may send some metadata related SQL, which interferes with your investigation.
I guess switches to 192.168.1.2 can connect by JDBC client. Because we request through HaProxy have success and fail. So we check the two proxy alone.Then find 192.168.1.1 can't connect by DBeaver.
version: shardingsphere-proxy.5.2.1 phenomenon: Use the same zookeeper with two proxy,for example,the proxy ip is 192.168.1.1,192.168.1.2. After a period of time,the client can't connect the proxy 192.168.1.1 and the proxy have no any error logs,but can connect the proxy 192.168.1.2.When restart the proxy 192.168.1.1 ,clent can connect the proxy 192.168.1.1.