赞
踩
nested exception is java.sql.SQLException: keepAliveBetweenTimeMillis must be grater than timeBetweenEvictionRunsMillis
新版本不兼容。
DruidDataSource中有下面这样的一个判断,要求keepAliveBetweenTimeMillis"保活检查间隔时间"要大:
if (this.keepAlive && this.keepAliveBetweenTimeMillis <= this.timeBetweenEvictionRunsMillis) {
throw new SQLException("keepAliveBetweenTimeMillis must be grater than timeBetweenEvictionRunsMillis");
}
1)keepAliveBetweenTimeMillis目前没有配置 //默认值= 120000L是120s,保活检查间隔时间 这个druid 1.1.1没有,druid1.2.8有且要求大于timeBetweenEvictionRunsMillis;
2).timeBetweenEvictionRunsMillis目前配置600000=600秒=10分 //默认值= 60000L是60s,检查空闲连接的频率
配置修改:
所有的timeBetweenEvictionRunsMillis修改为110秒,即:
timeBetweenEvictionRunsMillis=110000
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。