xiangshaonumber1 opened a new issue, #30480:
URL: https://github.com/apache/shardingsphere/issues/30480

   ## Example use shardingSphere
   LOG@2024-03-14 10:03:03.451 [BT-2]  INFO-> 
com.zaxxer.hikari.HikariDataSource.getConnection[110]: BaseHikariCP - 
Starting...
   LOG@2024-03-14 10:03:03.627 [BT-2]  INFO-> 
com.zaxxer.hikari.HikariDataSource.getConnection[110]: HikariPool-1 - 
Starting...
   LOG@2024-03-14 10:03:03.749 [BT-2]  INFO-> 
com.zaxxer.hikari.HikariDataSource.getConnection[123]: HikariPool-1 - Start 
completed.
   LOG@2024-03-14 10:03:03.806 [BT-2]  INFO-> 
com.zaxxer.hikari.HikariDataSource.getConnection[110]: HikariPool-2 - 
Starting...
   LOG@2024-03-14 10:03:03.933 [BT-2]  INFO-> 
com.zaxxer.hikari.HikariDataSource.getConnection[123]: HikariPool-2 - Start 
completed.
   LOG@2024-03-14 10:03:03.933 [BT-2]  INFO-> 
com.zaxxer.hikari.HikariDataSource.getConnection[110]: HikariPool-3 - 
Starting...
   LOG@2024-03-14 10:03:03.936 [BT-2]  INFO-> 
com.zaxxer.hikari.HikariDataSource.getConnection[123]: HikariPool-3 - Start 
completed.
   LOG@2024-03-14 10:03:03.936 [BT-2]  INFO-> 
com.zaxxer.hikari.HikariDataSource.getConnection[110]: HikariPool-4 - 
Starting...
   LOG@2024-03-14 10:03:03.939 [BT-2]  INFO-> 
com.zaxxer.hikari.HikariDataSource.getConnection[123]: HikariPool-4 - Start 
completed.
   LOG@2024-03-14 10:03:06.600 [BT-2]  INFO-> 
com.zaxxer.hikari.pool.PoolBase.getAndSetNetworkTimeout[541]: BaseHikariCP - 
Driver does not support get/set network timeout for connections. 
(getNetworkTimeout)
   LOG@2024-03-14 10:03:06.602 [BT-2]  INFO-> 
com.zaxxer.hikari.HikariDataSource.getConnection[123]: BaseHikariCP - Start 
completed.
   
   complete used 3s. why? 
   
   
   ## Example do not use shardingSphere
   LOG@2024-03-14 10:06:23.735 [BT-1]  INFO-> 
com.zaxxer.hikari.HikariDataSource.getConnection[110]: HikariPool-1 - 
Starting...
   LOG@2024-03-14 10:06:23.861 [BT-1]  INFO-> 
com.zaxxer.hikari.pool.HikariPool.checkFailFast[565]: HikariPool-1 - Added 
connection com.mysql.cj.jdbc.ConnectionImpl@6bea8488
   LOG@2024-03-14 10:06:23.863 [BT-1]  INFO-> 
com.zaxxer.hikari.HikariDataSource.getConnection[123]: HikariPool-1 - Start 
completed.
   
   like this, only used 130ms
   
   
   
   
   ## my config example (springboot2 + jdk21)
   spring:
     datasource:
       driver-class-name: org.apache.shardingsphere.driver.ShardingSphereDriver
       url: jdbc:shardingsphere:classpath:[email protected]@.yaml
       hikari:
        # this like do not work 
         minimum-idle: 2
         maximum-pool-size: 50
         auto-commit: true
         idle-timeout: 60000
         pool-name: BaseHikariCP
         max-lifetime: 180000
         validation-timeout: 1000
         connection-timeout: 3000
         keepalive-time: 30000
   
   ## config of sharding.yaml
   mode:
     type: Standalone
     repository:
       type: JDBC
   dataSources:
     write_ds:
       dataSourceClassName: com.zaxxer.hikari.HikariDataSource
       driverClassName: com.mysql.cj.jdbc.Driver
       jdbcUrl: 
jdbc:mysql://192.168.101.35:3307/testdb?useSSL=false&rewriteBatchedStatements=true&serverTimezone=GMT%2B8
       username: 
       password: 
     read_ds1:
       dataSourceClassName: com.zaxxer.hikari.HikariDataSource
       driverClassName: com.mysql.cj.jdbc.Driver
       jdbcUrl: 
jdbc:mysql://192.168.101.35:3307/testdb?useSSL=false&rewriteBatchedStatements=true&serverTimezone=GMT%2B8
       username: 
       password: 
     read_ds2:
       dataSourceClassName: com.zaxxer.hikari.HikariDataSource
       driverClassName: com.mysql.jdbc.Driver
       jdbcUrl: 
jdbc:mysql://192.168.101.35:3307/testdb?useSSL=false&rewriteBatchedStatements=true&serverTimezone=GMT%2B8
       username: 
       password: 
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: 
[email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to