Possibly consider using a shorter maxLifetime value.解决方法
【现象】
2022-08-24 14:54:49.130 WARN 174160 --- [nio-8082-exec-3] com.zaxxer.hikari.pool.PoolBase : HikariPool-1 - Failed to validate connection com.mysql.cj.jdbc.ConnectionImpl@7df9ca28 (No operations allowed after connection closed.). Possibly consider using a shorter maxLifetime value.2022-08-24 14:54:54.146 WARN 174160 --- [nio-8082-exec-3] com.zaxxer.hikari.pool.PoolBase : HikariPool-1 - Failed to validate connection com.mysql.cj.jdbc.ConnectionImpl@7150aa4 (No operations allowed after connection closed.). Possibly consider using a shorter maxLifetime value.2022-08-24 14:54:54.154 WARN 174160 --- [nio-8082-exec-2] com.zaxxer.hikari.pool.PoolBase : HikariPool-1 - Failed to validate connection com.mysql.cj.jdbc.ConnectionImpl@16c7f560 (No operations allowed after connection closed.). Possibly consider using a shorter maxLifetime value.
【解决方法】
spring:datasource:driver-class-name: com.mysql.cj.jdbc.Driverurl: jdbc:mysql://localhost:3306/user?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=UTCusername: rootpassword: root
修改为:
spring:datasource:driver-class-name: com.mysql.cj.jdbc.Driverurl: jdbc:mysql://localhost:3306/user?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=UTCusername: rootpassword: roothikari:connection-timeout: 10000validation-timeout: 3000idle-timeout: 60000login-timeout: 5max-lifetime: 60000maximum-pool-size: 10minimum-idle: 5read-only: false
Possibly consider using a shorter maxLifetime value.解决方法相关推荐
- Possibly consider using a shorter maxLifetime value.问题处理
问题描述: 发现日志中总是报这么个warn: Possibly consider using a shorter maxLifetime value. 解决思路: 其中的Dataxxxx中的xxxx是 ...
- (No operations allowed after connection closed.).Possibly consider using a shorter maxLifetime value
这两天碰到一个问题,在正常查询数据时,没有问题,但在使用多线程查询数据导出时,会报以下错误: 2020-05-21 08:40:36.639 WARN [charger-business,,,] 13 ...
- Hikaril过一段时间就出错,Possibly consider using a shorter maxLifetime value问题
问题背景: 我用的springboot2.2.,Hikari,,mysql,mp-plus.没有用druid,我不需要监控,就用spring自带的,做数据库连接时候,有段时间不连接,过一会就出错: H ...
- HikariCP连接池:Possibly consider using a shorter maxLifetime value.
错误分析.定位 在项目中使用到了数据库集群,使用时发现项目运行并且没有操作数据库一段时间之后再次操作数据库就会控制台出现以下报错. Failed to validate connection com. ...
- springboot Possibly consider using a shorter maxLifetime value.
我们在springboot项目中使用默认的连接池时,有时过一段时间不使用数据库,再次查询数据库时会报错,显示连接池中的连接不可用.具体就是报Possibly consider using a shor ...
- SpringBoot 中使用HikariPool 报错Possibly consider using a shorter maxLifetime value.
SpringBoot 使用HikariPool遇到: HikariPool-1 - Failed to validate connection com.mysql.jdbc.JDBC4Connecti ...
- kafka同步mysql数据报Possibly consider using a shorter maxLifetime value.
目前有需求是在两个mysql数据库间同步数据,采用的方案是先利用maxwell将源数据库的log_bin日志传到kafka,再从kafka消费到目的数据库,但最近发现日志中总是报这么个warn: [1 ...
- Possibly consider using a shorter maxLifetime value.
启动我的 SpringBoot 应用程序后,在服务器启动几分钟后出现异常.没有在外部使用任何 HikariPool 配置,Spring Boot 默认使用 HikariPool 这是我在控制台中遇到的 ...
- SpringCloud 中使用HikariPool 报错Possibly consider using a shorter maxLifetime value
SpringCloud 或 SpringBoot 使用HikariPool遇到: com.zaxxer.hikari.pool.PoolBase : HikariPool-1 - Failed to ...
最新文章
- linux操作系统的两种桌面环境,Linux操作系统中常见的桌面环境介绍
- 设置datagridview的数据源为(DATASET)SQL查寻结果
- AJAX异步原理与实现
- oracle 数据库字段名与实体类字段名称不匹配的处理方法
- 从Flash到Silverlight进阶教程-用代码来创建动画
- 证明:对于一棵二叉树,若度为2的结点有n2个,叶子结点有n0个,则n0=n2+1
- 面试39 MySQL读写分离
- 池化对象 RecyclableMemoryStream 在 .netcore 中的使用
- 索引 mysql_深入理解MySQL索引
- redis缓存跟数据库数据不一致问题解决
- 微软正式发布 Silverlight 5
- Delphi Sysem.JSON 链式写法(转全能中间件)
- stdafx.h作用以及include中为何iostream必须放在stdafx.h之后?
- Python可配置爬虫_自定义IP+数据库+日志+分类+分页(代理IP破解反爬虫)
- 【阅读笔记】联邦学习实战——用FATE从零实现横向逻辑回归
- 【年中总结】与自己来一场博弈,带着温柔与敌意。
- 5G商用元年开启万亿市场, 25G服务器端口出货量大幅增长
- Nginx的try_files指令详解
- 估值指标一把手——市盈率
- order by、distribute by、sort by、group by、partition by
热门文章
- 基于单片机的北斗定位无人机救火系统(两种程序:单片机与android系统app程序源码)
- mysql.lib 是mtd mdd_VS运行时 /MD、/MDd 和 /MT、/MTd之间的区别
- flash保存html,如何把网页上的flash动画保存为swf格式文件(缓存提取)
- 修复损坏的gzip压缩文件方法之实用篇
- java文件用editplus乱码,EditPlus中文乱码问题
- 项目资源管理-日历图
- a3.ansible 生产实战案例 -- 系统初始化roles
- 极兔速递 一面面试题
- 挑战2.7.3 Round 1C 2009 C. Bribe the Prisoners 区间dp
- 对象(创建对象、构造函数)