小编Fla*_*239的帖子

连接未关闭(HikariCP、Postgres)

环境

春季启动 2.1.2。

2 个环境:local(postgres 11)和qa(docker swarm with postgres 10 和应用程序)

问题

maxLifetime传球,阿光重新创建连接(关闭旧的,创造新的),但对qa环境的连接没有得到关闭:与检查select * from pg_stat_activity wheredataname=... ,并在日志中,我们有:

2019-09-25 12:00:20.694 DEBUG 6 --- [nnection closer] c.z.h.p.PoolBase                         : HikariPool-1 - Closing connection org.postgresql.jdbc.PgConnection@54d41592: (connection has passed maxLifetime)
2019-09-25 12:00:20.699 DEBUG 6 --- [onnection adder] c.z.h.p.HikariPool                       : HikariPool-1 - Added connection org.postgresql.jdbc.PgConnection@29e14ddb
2019-09-25 12:00:26.372 DEBUG 6 --- [nnection closer] c.z.h.p.PoolBase                         : HikariPool-1 - Closing connection org.postgresql.jdbc.PgConnection@11684c62: (connection has passed maxLifetime)
2019-09-25 12:00:26.376 DEBUG …
Run Code Online (Sandbox Code Playgroud)

postgresql spring-boot hikaricp docker-swarm

3
推荐指数
1
解决办法
8487
查看次数

标签 统计

docker-swarm ×1

hikaricp ×1

postgresql ×1

spring-boot ×1