0

We have configured Hikari with a maximum of 24 connections. However, in our Oracle DB we are observing more than 100 active connections per pod. Our setup is Spring Boot with Kafka (Confluent) using a parallel consumer, with concurrency set to 12. Additionally, we have a retry mechanism configured (maximum of 3 attempts) within a transactional method.

When we log conn status every 30 sec from Hikari data source its always showing correct value. However in Oracle DB its showing different.

Could you please help us understand why this is happening and guide us on how to address it?

we are using <ojdbc11.version>23.8.0.25.04</ojdbc11.version>

hikari: # === Pool Size Settings === maximum-pool-size: ${HIKARI_MAXIMUM_POOL_SIZE:24} # Maximum number of connections in the pool minimum-idle: ${HIKARI_MINMUM_IDLE:6} # Minimum number of idle connections to maintain # === Timeout Settings === connection-timeout: ${HIKARI_CONNECTION_TIMEOUT:10000} # Max time (10s) to wait for connection from pool max-lifetime: ${HIKARI_MAX_LIFETIME:1800000} # Max lifetime (30min) of connection in pool idle-timeout: ${HIKARI_IDLE_TIMEOUT:600000} # Max time (10min) connection can sit idle validation-timeout: ${HIKARI_VALIDATION_TIMEOUT:3000} # Max time (3s) to wait for connection validation leak-detection-threshold: ${HIKARI_LEAK_DETECTION_THRESHOLD:300000} # Time (5min) after which connection is considered leaked auto-commit: ${HIKARI_AUTO_COMMIT:false} pool-status-logging: ${HIKARI_POOL_STATUS_LOGGING:false} # === Oracle-Specific Properties === data-source-properties: # Connection validation method (LOCAL = client-side validation) oracle.jdbc.defaultConnectionValidation: LOCAL # Socket read timeout - max time to wait for data from Oracle server oracle.jdbc.ReadTimeout: ${ORACLE_JDBC_READTIMEOUT:45000} # 45 seconds # TCP connection timeout - max time to establish connection to Oracle oracle.net.CONNECT_TIMEOUT: ${ORACLE_NET_CONNECT_TIMEOUT:10000} # 10 seconds # Database login timeout - max time to authenticate with Oracle oracle.jdbc.loginTimeout: ${ORACLE_JDBC_LOGIN_TIMEOUT:10} # 10 seconds # Add query timeout to prevent long-running statements oracle.jdbc.queryTimeout: ${ORACLE_JDBC_QUERY_TIMEOUT:40} # 40 seconds for individual SQL statements # Prevent network drops oracle.net.keepAlive: ${ORACLE_NET_KEEPALIVE:true} # Set custom identifiers in Oracle v$session to distinguish HikariCP connections from other sources oracle.jdbc.v$session.program: "HIKARI-POOL" oracle.jdbc.v$session.osuser: "HIKARI" 
2
  • Why do you think hikari is a valid configuration property root in standard Spring Boot? The default data source configuration would be at spring.datasource.hikari.*, not just hikari.*. So either you're not showing the entire thing, or you need to show your custom configuration classes. Commented Sep 24 at 15:00
  • its correct, i only posted haikai part. We dont have any custom config. Commented Sep 24 at 15:02

1 Answer 1

0

After downgrading ojdbc11.version to 21.11.0.0 resolved the issue. seems latest version have conn leakage.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.