HikariPool无法验证连接

时间:2020-05-22 09:19:54

标签: java postgresql event-sourcing hikaricp axon

我使用Axon Framework作为事件源框架,我唯一拥有的轴突配置是:

axon.saga.integrateAndShelve.threadCount = 2

axon.saga.integrateAndShelve.segmentCount = 6

对于事件存储的数据源,我使用以下配置:

spring.datasource.url = jdbc:postgresql:// {url}

spring.datasource.username =用户

spring.datasource.password = pass

spring.datasource.maxActive = 200(由于此经常性错误而不得不添加它,无法打开JPA EntityManager进行事务;嵌套的异常是org.hibernate.exception.JDBCConnectionException:无法获取JDBC连接)

spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect

spring.jpa.generate-ddl = false

spring.jpa.properties.hibernate.temp.use_jdbc_metadata_defaults = false

正如标题所述,我在日志中抛出此错误,不确定是否跳过了写事件,因为我没有收到其他任何日志(没有写入错误,没有重试),但是得到了我很担心

HikariPool-1-无法验证连接 org.postgresql.jdbc.PgConnection@7e44c5d8(此连接已 关闭。)。可能考虑使用较短的maxLifetime值。

编辑:添加一些相关的build.gradle信息

annotationProcessor "org.springframework.boot:spring-boot-configuration-processor"
compile "org.springframework.retry:spring-retry:1.2.4.RELEASE"
compile('org.postgresql:postgresql')
compile('org.springframework.boot:spring-boot-starter-data-jpa')
compile('org.springframework.boot:spring-boot-starter-data-mongodb')
compile("org.axonframework:axon-spring-boot-starter:4.0.3") {
    exclude group: 'org.axonframework', module: 'axon-server-connector'
}

testCompile "org.axonframework:axon-test:4.1"
testCompile "org.springframework.boot:spring-boot-starter-test"

0 个答案:

没有答案