1

Hikari Pool looks like using only 1 or 2 connections in many connections in pool. I don't know why?

Our service use hikari connection pool on starting my service. maximumPoolSize 50 connectTimeout 3000

and I sent 100 request to our service from jmeter and monitor mysql process list. mysql process is made 100 process. But only using 2 connections used. this others is sleeping. why connection pool use only 2 ? Is there any configuration in Hikari pool?

jaechoi
  • 11
  • 3

1 Answers1

0

Either you are measuring this wrong in MySQL or the application doesn't require more connections and you can decrease the pool size. If you are unsure you should review your JMeter test case by debugging it for just a single concurrent user to prove that it does what you expect before going with 100 concurrent users.

With a pool like HikariCP your application code get's a proxy Connection object to a physical Connection object maintained each time DataSource.getConnection() is invoked. If your application has a short lived transactions e.g. new transaction for fast SELECT ... FROM ... statements the physical connection utilization could be low.

Karol Dowbecki
  • 43,645
  • 9
  • 78
  • 111
  • I think you're right. However, using jmeters when multiple requests are fired at the same time, the response becomes slower and slower as actual processing is done with two connections. I don't know if this is a problem with Hicari CP or any other. – jaechoi Jul 05 '19 at 07:56
  • You have to debug the application to understand this, there is no other way. – Karol Dowbecki Jul 05 '19 at 08:42