HikariCP icon indicating copy to clipboard operation
HikariCP copied to clipboard

Could not add new connection to cp

Open kilosonc opened this issue 2 years ago • 2 comments

After running about 3 hours, it could not add new connection to connection pool. There's same question in issues, but developer comments said it has been fixed in v5.0.0, so I change into v5.0.0. But it still appears. Request for help!!!

SpringBoot Config

spring:
  datasource:
    hikari:
      minimum-idle: 5
      maximum-pool-size: 10
      idle-timeout: 180000
      auto-commit: true
      connection-test-query: SELECT 1
      max-lifetime: 180000
      leakDetectionThreshold: 2000

    driver-class-name: org.postgresql.Driver
    url: ${POSTGRES_DATABASE:jdbc:postgresql://xxxx:5432/test?ssl=true&connectTimeout=0&socketTimeout=0&tcpKeepAlive=true}
    username: ${POSTGRES_UESRNAME:xxx}
    password: ${POSTGRES_PASSWORD:xxx}
2021-08-13 11:39:11.727 DEBUG 14564 --- [nnection closer] com.zaxxer.hikari.pool.PoolBase          : HikariPool-1 - Closing connection org.postgresql.jdbc.PgConnection@4090677: (connection was evicted)
2021-08-13 11:39:12.139 DEBUG 14564 --- [onnection adder] com.zaxxer.hikari.pool.HikariPool        : HikariPool-1 - Added connection org.postgresql.jdbc.PgConnection@25bab4cd
2021-08-13 11:39:17.903 DEBUG 14564 --- [l-1 housekeeper] com.zaxxer.hikari.pool.HikariPool        : HikariPool-1 - Pool stats (total=5, active=1, idle=4, waiting=0)
2021-08-13 11:39:23.262  INFO 14564 --- [pool-1-thread-2] c.m.t.s.c.core.handler.AlarmAnalyzer     : {increasedCount=441, increasedDevice=194, increasedCountAllVersion=856, increasedDeviceAllVersion=357} enforced to be true
2021-08-13 11:39:24.084 DEBUG 14564 --- [l-1 housekeeper] com.zaxxer.hikari.pool.HikariPool        : HikariPool-1 - Add connection elided, waiting=0, adders pending/running=2
2021-08-13 11:39:24.085 DEBUG 14564 --- [nnection closer] com.zaxxer.hikari.pool.PoolBase          : HikariPool-1 - Closing connection org.postgresql.jdbc.PgConnection@16b23077: (connection has passed maxLifetime)
2021-08-13 11:39:33.199 DEBUG 14564 --- [l-1 housekeeper] com.zaxxer.hikari.pool.HikariPool        : HikariPool-1 - Add connection elided, waiting=0, adders pending/running=3
2021-08-13 11:39:33.199 DEBUG 14564 --- [nnection closer] com.zaxxer.hikari.pool.PoolBase          : HikariPool-1 - Closing connection org.postgresql.jdbc.PgConnection@3c6d0d6e: (connection has passed maxLifetime)
2021-08-13 11:39:47.905 DEBUG 14564 --- [l-1 housekeeper] com.zaxxer.hikari.pool.HikariPool        : HikariPool-1 - Pool stats (total=3, active=0, idle=3, waiting=0)
2021-08-13 11:40:17.914 DEBUG 14564 --- [l-1 housekeeper] com.zaxxer.hikari.pool.HikariPool        : HikariPool-1 - Pool stats (total=3, active=0, idle=3, waiting=0)
2021-08-13 11:40:47.918 DEBUG 14564 --- [l-1 housekeeper] com.zaxxer.hikari.pool.HikariPool        : HikariPool-1 - Pool stats (total=3, active=0, idle=3, waiting=0)
2021-08-13 11:40:48.293 DEBUG 14564 --- [l-1 housekeeper] com.zaxxer.hikari.pool.HikariPool        : HikariPool-1 - Add connection elided, waiting=0, adders pending/running=7
2021-08-13 11:40:48.294 DEBUG 14564 --- [nnection closer] com.zaxxer.hikari.pool.PoolBase          : HikariPool-1 - Closing connection org.postgresql.jdbc.PgConnection@4ef4d511: (connection has passed maxLifetime)
2021-08-13 11:41:17.920 DEBUG 14564 --- [l-1 housekeeper] com.zaxxer.hikari.pool.HikariPool        : HikariPool-1 - Pool stats (total=2, active=0, idle=2, waiting=0)
2021-08-13 11:41:40.826 DEBUG 14564 --- [l-1 housekeeper] com.zaxxer.hikari.pool.HikariPool        : HikariPool-1 - Add connection elided, waiting=0, adders pending/running=9
2021-08-13 11:41:40.827 DEBUG 14564 --- [nnection closer] com.zaxxer.hikari.pool.PoolBase          : HikariPool-1 - Closing connection org.postgresql.jdbc.PgConnection@4cec8932: (connection has passed maxLifetime)
2021-08-13 11:41:47.925 DEBUG 14564 --- [l-1 housekeeper] com.zaxxer.hikari.pool.HikariPool        : HikariPool-1 - Pool stats (total=1, active=0, idle=1, waiting=0)
2021-08-13 11:42:09.779 DEBUG 14564 --- [l-1 housekeeper] com.zaxxer.hikari.pool.HikariPool        : HikariPool-1 - Add connection elided, waiting=0, adders pending/running=11
2021-08-13 11:42:09.779 DEBUG 14564 --- [nnection closer] com.zaxxer.hikari.pool.PoolBase          : HikariPool-1 - Closing connection org.postgresql.jdbc.PgConnection@25bab4cd: (connection has passed maxLifetime)
2021-08-13 11:42:17.928 DEBUG 14564 --- [l-1 housekeeper] com.zaxxer.hikari.pool.HikariPool        : HikariPool-1 - Pool stats (total=0, active=0, idle=0, waiting=0)
2021-08-13 11:42:47.944 DEBUG 14564 --- [l-1 housekeeper] com.zaxxer.hikari.pool.HikariPool        : HikariPool-1 - Pool stats (total=0, active=0, idle=0, waiting=0)
2021-08-13 11:43:09.918  INFO 14564 --- [pool-1-thread-1] c.m.t.s.c.core.handler.Handler           : get 1 items form appcenter
2021-08-13 11:43:09.919 DEBUG 14564 --- [pool-1-thread-1] com.zaxxer.hikari.pool.HikariPool        : HikariPool-1 - Add connection elided, waiting=1, adders pending/running=14
2021-08-13 11:43:17.946 DEBUG 14564 --- [l-1 housekeeper] com.zaxxer.hikari.pool.HikariPool        : HikariPool-1 - Pool stats (total=0, active=0, idle=0, waiting=1)
2021-08-13 11:43:39.930 DEBUG 14564 --- [pool-1-thread-1] com.zaxxer.hikari.pool.HikariPool        : HikariPool-1 - Timeout failure stats (total=0, active=0, idle=0, waiting=0)
2021-08-13 11:43:39.966 ERROR 14564 --- [pool-1-thread-1] c.m.t.s.c.core.handler.Handler           : an error occurred in handler: nested exception is org.apache.ibatis.exceptions.PersistenceException: 
### Error querying database.  Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLTransientConnectionException: HikariPool-1 - Connection is not available, request timed out after 30012ms.
### The error may exist in com/microsoft/teams/search/crashmonitor/core/dao/CrashDao.java (best guess)
### The error may involve com.microsoft.teams.search.crashmonitor.core.dao.CrashDao.selectList
### The error occurred while executing a query
### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLTransientConnectionException: HikariPool-1 - Connection is not available, request timed out after 30012ms.
2021-08-13 11:43:47.953 DEBUG 14564 --- [l-1 housekeeper] com.zaxxer.hikari.pool.HikariPool        : HikariPool-1 - Pool stats (total=0, active=0, idle=0, waiting=0)
2021-08-13 11:44:17.962 DEBUG 14564 --- [l-1 housekeeper] com.zaxxer.hikari.pool.HikariPool        : HikariPool-1 - Pool stats (total=0, active=0, idle=0, waiting=0)

kilosonc avatar Aug 13 '21 03:08 kilosonc

Even we are facing similar kind of problem, any help on this issue ?

cherryBerry23 avatar Oct 22 '21 14:10 cherryBerry23