【发布时间】:2017-11-29 17:19:05
【问题描述】:
我在 HikariCP 中使用 springboot,但过了一段时间我的应用程序崩溃并出现错误:
org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager for transaction; nested exception is org.hibernate.exception.JDBCConnectionException: Unable to acquire JDBC Connection
...
Caused by: org.hibernate.exception.JDBCConnectionException: Unable to acquire JDBC Connection
....
Caused by: java.sql.SQLTransientConnectionException: HikariPool-6 - Connection is not available, request timed out after 30000ms.
这是我的应用程序属性
spring.datasource.type=com.zaxxer.hikari.HikariDataSource
spring.datasource.url=jdbc:postgresql://localhost:5432/db_dnaso
#spring.datasource.url=jdbc:postgresql://172.16.1.10:5432/db_dnaso
spring.datasource.username=postgres
spring.datasource.password=dna44100
spring.datasource.driver-class-name=org.postgresql.Driver
所以我有很多保存、查找和其他人访问数据库的权限,我如何可视化方法如何阻止我的连接?
tks
【问题讨论】:
标签: postgresql spring-boot spring-data-jpa hikaricp