2016-5-06 15:31:53 -2722434 [http-apr-8090-exec-4] DEBUG - skip not validate connection.

2016-5-06 15:32:12 -2741345 [http-apr-8090-exec-4] DEBUG - skip not validate connection.

用的druid关联连接池,数据库是mysql,一段时间不用之后就会报这个错误。之前有人说是mysql系统的问题。我从window换成linux也是这样。下面是我的配置文件

url:jdbc:mysql://xxx.xx.xxx.xxx:3306/XXX?Unicode=true&characterEncoding=utf8&autoReconnect=true

driverClassName:com.mysql.jdbc.Driver

username:root

password:123456

filters:stat

maxActive:100

initialSize:10

maxWait:60000

minIdle:20

maxIdle:100

timeBetweenEvictionRunsMillis:60000

minEvictableIdleTimeMillis:300000

validationQuery:SELECT 'x'

testWhileIdle:true

testOnBorrow:false

testOnReturn:false

maxOpenPreparedStatements:20

removeAbandoned:true

removeAbandonedTimeout:180

logAbandoned:true

spring里面的配置

destroy-method="close">

是不是哪里配错了?为什么会出现这个情况? 数据库是远程服务器上的数据库,网络绝对没有问题。目前能排除的问题有网络、数据库(换过低版本,高版本)、系统(window、linux)、所以这个问题应该出现在程序上,应该是我配置文件的问题。求大神解答。。

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐