HikariCP icon indicating copy to clipboard operation
HikariCP copied to clipboard

About a large number of connectionTimeout problems in the program

Open 13821042128 opened this issue 1 year ago • 1 comments

My SpringBoot program is deployed on Linux for Jmeter pressure test, about 250 concurrency, a lot of connection timeout problems occur, I use the default configuration ConectionTimeout 30s,I added a connection leak configuration of 30s, and found a large number of connection leaks, of course it is not a real leak, but not released within 30s.It is worth mentioning that my linux server is 1 minute 50s slower than the Internet time. At the same time, my database service is deployed on another server, and the time is also slower than the Internet and 20s slower than the server where the service is located. Will my server time affect the HikariCP clock?And I also found a problem, my program uses the default maxLifeTime configuration of 30min, but the log shows as follows: 2023-07-20 14:03:17.370 [dm connection adder] com.zaxxer.hikari.pool.HikariPool$PoolEntryCreator:call:729 - dm - Added connection dm.jdbc.driver.DmdbConnection@77ded614 行 292: 2023-07-20 14:04:14.614 [dm housekeeper] com.zaxxer.hikari.pool.ProxyLeakTask:run:84 - Connection leak detection triggered for dm.jdbc.driver.DmdbConnection@77ded614 on thread http-nio2-0.0.0.0-9798-exec-1355, stack trace follows 行 427: 2023-07-20 14:04:15.426 [http-nio2-0.0.0.0-9798-exec-1355] com.zaxxer.hikari.pool.ProxyLeakTask:cancel:91 - Previously reported leaked connection dm.jdbc.driver.DmdbConnection@77ded614 on thread http-nio2-0.0.0.0-9798-exec-1355 was returned to the pool (unleaked) 行 9871: 2023-07-20 14:17:13.082 [dm housekeeper] com.zaxxer.hikari.pool.ProxyLeakTask:run:84 - Connection leak detection triggered for dm.jdbc.driver.DmdbConnection@77ded614 on thread http-nio2-0.0.0.0-9798-exec-1184, stack trace follows 行 13550: 2023-07-20 14:17:27.387 [http-nio2-0.0.0.0-9798-exec-1184] com.zaxxer.hikari.pool.ProxyLeakTask:cancel:91 - Previously reported leaked connection dm.jdbc.driver.DmdbConnection@77ded614 on thread http-nio2-0.0.0.0-9798-exec-1184 was returned to the pool (unleaked) 行 17065: 2023-07-20 14:32:49.673 [dm connection closer] com.zaxxer.hikari.pool.PoolBase:quietlyCloseConnection:134 - dm - Closing connection dm.jdbc.driver.DmdbConnection@77ded614: (connection has passed maxLifetime) I found that the time from the creation of this connection to the release of maxLifeTime is less than 30 minutes.I would like to ask whether the inaccurate time of my service system will affect the clock statistics of HikariCP? hikari.log

13821042128 avatar Jul 22 '23 05:07 13821042128

Can you also post all the configuration of maxLifeTime, leakDetectionThreshold ...etc that you have config in your application ??

gary258796 avatar Nov 16 '23 12:11 gary258796