Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is taking HikariCP so long to create new connections?

I am using version 2.3.7 for Java 6. I have set maximumPoolSize to 200 and connectionTimeout to 30 s. I run into SQLTimeoutExceptions from BaseHikariPool.getConnection in one of our load test cases involving 70 simultaneous users uploading 10 files each. I turned on debug logging and obtained pool stats. So it would seem that the pool isn't being exhausted. Rather, HikariCP takes longer than connectionTimeout to create new connections. How can I debug this part of the process? The underlying data source is SQLServerDataSource version 4.1.

like image 340
Chry Cheng Avatar asked Sep 05 '25 16:09

Chry Cheng


1 Answers

connectionTimeout is the maximum time to wait for obtaining connection from pool. it is NOT time out for creating connection from data source. there is none.

You may want to consider reducing pool size. begin load testing with minimum and gradually increasing till SqlServer begins to take much longer to create connection. check about pool size

HTH

like image 121
Nitin Avatar answered Sep 07 '25 18:09

Nitin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!