繁体   English   中英

无法获得隔离的 JDBC 连接:org.hibernate.exception.JDBCConnectionException

[英]Unable to obtain isolated JDBC connection: org.hibernate.exception.JDBCConnectionException

我面临这个问题 2 小时。

问题是我还有其他课程运行良好。 我不知道为什么当前班级会发生此错误。

org.hibernate.exception.JDBCConnectionException: unable to obtain isolated JDBC connection
Caused by: java.sql.SQLTransientConnectionException: HikariPool-1 - Connection is not available, request timed out after 351ms.

但该代码适用于其他表(其他类)。

直到今天它都运行良好。 有没有人遇到过这个问题?

2020-03-13 13:52:25,392 [main] WARN  com.zaxxer.hikari.HikariConfig -ScraperPool - idleTimeout is less than 10000ms, setting to default 600000ms.
2020-03-13 13:52:25,400 [main] DEBUG com.zaxxer.hikari.HikariConfig -ScraperPool - configuration:
2020-03-13 13:52:25,406 [main] DEBUG com.zaxxer.hikari.HikariConfig -allowPoolSuspension.............false
2020-03-13 13:52:25,407 [main] DEBUG com.zaxxer.hikari.HikariConfig -autoCommit......................true
2020-03-13 13:52:25,407 [main] DEBUG com.zaxxer.hikari.HikariConfig -catalog.........................none
2020-03-13 13:52:25,408 [main] DEBUG com.zaxxer.hikari.HikariConfig -connectionInitSql...............none
2020-03-13 13:52:25,408 [main] DEBUG com.zaxxer.hikari.HikariConfig -connectionTestQuery.............none
2020-03-13 13:52:25,409 [main] DEBUG com.zaxxer.hikari.HikariConfig -connectionTimeout...............10000
2020-03-13 13:52:25,409 [main] DEBUG com.zaxxer.hikari.HikariConfig -dataSource......................none
2020-03-13 13:52:25,409 [main] DEBUG com.zaxxer.hikari.HikariConfig -dataSourceClassName.............none
2020-03-13 13:52:25,410 [main] DEBUG com.zaxxer.hikari.HikariConfig -dataSourceJNDI..................none
2020-03-13 13:52:25,411 [main] DEBUG com.zaxxer.hikari.HikariConfig -dataSourceProperties............{password=<masked>, prepStmtCacheSqlLimit=2048, cachePrepStmts=true, prepStmtCacheSize=250, leakDetectionThreshold=15000}
2020-03-13 13:52:25,412 [main] DEBUG com.zaxxer.hikari.HikariConfig -driverClassName.................none
2020-03-13 13:52:25,412 [main] DEBUG com.zaxxer.hikari.HikariConfig -healthCheckProperties...........{}
2020-03-13 13:52:25,412 [main] DEBUG com.zaxxer.hikari.HikariConfig -healthCheckRegistry.............none
2020-03-13 13:52:25,413 [main] DEBUG com.zaxxer.hikari.HikariConfig -idleTimeout.....................600000
2020-03-13 13:52:25,413 [main] DEBUG com.zaxxer.hikari.HikariConfig -initializationFailTimeout.......1
2020-03-13 13:52:25,413 [main] DEBUG com.zaxxer.hikari.HikariConfig -isolateInternalQueries..........false
2020-03-13 13:52:25,414 [main] DEBUG com.zaxxer.hikari.HikariConfig -jdbcUrl.........................jdbc:mysql://**********?verifyServerCertificate=false&useSSL=true&serverTimezone=UTC
2020-03-13 13:52:25,414 [main] DEBUG com.zaxxer.hikari.HikariConfig -leakDetectionThreshold..........10000
2020-03-13 13:52:25,414 [main] DEBUG com.zaxxer.hikari.HikariConfig -maxLifetime.....................1800000
2020-03-13 13:52:25,414 [main] DEBUG com.zaxxer.hikari.HikariConfig -maximumPoolSize.................100
2020-03-13 13:52:25,415 [main] DEBUG com.zaxxer.hikari.HikariConfig -metricRegistry..................none
2020-03-13 13:52:25,415 [main] DEBUG com.zaxxer.hikari.HikariConfig -metricsTrackerFactory...........none
2020-03-13 13:52:25,415 [main] DEBUG com.zaxxer.hikari.HikariConfig -minimumIdle.....................4
2020-03-13 13:52:25,415 [main] DEBUG com.zaxxer.hikari.HikariConfig -password........................<masked>
2020-03-13 13:52:25,416 [main] DEBUG com.zaxxer.hikari.HikariConfig -poolName........................"ScraperPool"
2020-03-13 13:52:25,416 [main] DEBUG com.zaxxer.hikari.HikariConfig -readOnly........................false
2020-03-13 13:52:25,416 [main] DEBUG com.zaxxer.hikari.HikariConfig -registerMbeans..................true
2020-03-13 13:52:25,417 [main] DEBUG com.zaxxer.hikari.HikariConfig -scheduledExecutor...............none
2020-03-13 13:52:25,417 [main] DEBUG com.zaxxer.hikari.HikariConfig -schema..........................none
2020-03-13 13:52:25,417 [main] DEBUG com.zaxxer.hikari.HikariConfig -threadFactory...................internal
2020-03-13 13:52:25,417 [main] DEBUG com.zaxxer.hikari.HikariConfig -transactionIsolation............default
2020-03-13 13:52:25,418 [main] DEBUG com.zaxxer.hikari.HikariConfig -username........................"xxxxxxxxxxx"
2020-03-13 13:52:25,418 [main] DEBUG com.zaxxer.hikari.HikariConfig -validationTimeout...............5000
2020-03-13 13:52:25,420 [main] INFO  com.zaxxer.hikari.HikariDataSource -ScraperPool - Starting...
2020-03-13 13:52:25,452 [main] DEBUG com.zaxxer.hikari.util.DriverDataSource -Loaded driver with class name com.mysql.cj.jdbc.Driver for jdbcUrl=jdbc:mysql://*********?verifyServerCertificate=false&useSSL=true&serverTimezone=UTC
2020-03-13 13:52:27,099 [main] DEBUG com.zaxxer.hikari.pool.HikariPool -ScraperPool - Added connection com.mysql.cj.jdbc.ConnectionImpl@e84a8e1
2020-03-13 13:52:27,107 [main] INFO  com.zaxxer.hikari.HikariDataSource -ScraperPool - Start completed.
2020-03-13 13:52:27,211 [ScraperPool housekeeper] DEBUG com.zaxxer.hikari.pool.HikariPool -ScraperPool - Before cleanup stats (total=1, active=0, idle=1, waiting=0)
2020-03-13 13:52:27,212 [ScraperPool housekeeper] DEBUG com.zaxxer.hikari.pool.HikariPool -ScraperPool - After cleanup  stats (total=1, active=0, idle=1, waiting=0)
2020-03-13 13:52:27,280 [ScraperPool connection adder] DEBUG com.zaxxer.hikari.pool.HikariPool -ScraperPool - Added connection com.mysql.cj.jdbc.ConnectionImpl@58b0aed5
2020-03-13 13:52:27,346 [ScraperPool connection adder] DEBUG com.zaxxer.hikari.pool.HikariPool -ScraperPool - Added connection com.mysql.cj.jdbc.ConnectionImpl@285edfdd
2020-03-13 13:52:27,414 [ScraperPool connection adder] DEBUG com.zaxxer.hikari.pool.HikariPool -ScraperPool - Added connection com.mysql.cj.jdbc.ConnectionImpl@79a25ba1
2020-03-13 13:52:27,415 [ScraperPool connection adder] DEBUG com.zaxxer.hikari.pool.HikariPool -ScraperPool - After adding stats (total=4, active=0, idle=4, waiting=0)

我在错误发生之前得到了这条线

DEBUG com.zaxxer.hikari.pool.HikariPool -HikariPool-1 - Timeout failure stats (total=1, active=1, idle=0, waiting=0)

尝试增加池的最大限制。 下面的代码告诉你池达到了配置中设置的最大连接限制。

DEBUG com.zaxxer.hikari.pool.HikariPool -HikariPool-1 - Timeout failure stats (total=1, active=1, idle=0, waiting=0)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM