I've configured max pool size as 10 in my Spring boot 2.0 application(I'm using Hikari connection pool). I'm testing my REST API using JMeter. I am trying to simulate 500 concurrent users(Thread Group - > Thread Properties -> Number of Threads (user):500). I expect the test to fail after 20th request but my JMeter test is working perfectly.
spring.datasource.hikari.minimumIdle: 10
spring.datasource.hikari.maximumPoolSize: 10
spring.datasource.hikari.connectionTimeout: 30000
spring.datasource.hikari.idleTimeout: 600000
spring.datasource.hikari.maxLifetime: 1800000
spring.datasource.hikari.connectionInitSql: SELECT 1 FROM DUAL
pom.xml
<dependency>
<groupId>com.oracle.jdbc</groupId>
<artifactId>ojdbc7</artifactId>
<version>12.1.0.2</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
- Even thought I have maximumPoolSize 10 I am able to make 500 connection concurrently. why it is allowing?
- Whether my Hikari connection pool setup is wrong? i.e. do i need to disable tomcat connection pool by excluding it in pom.xml (i believe it is not required in Spring 2.0)
500 connections
, jmeter threads? If you really want to count database connections you have to count ESTABLISHED tcp connections to the database. – LMC