数据库连接超时,自动关闭 was active for 315435 milliseconds and has been removed automaticaly

在长时间导出数据时,经常看到一个错误,但是没怎么影响程序,就一直没管,今天就把它揪出来

[WARN] #0001 was active for 315435 milliseconds and has been removed automaticaly.
 The Thread responsible was named 'quartz-simpleThreadPoolTaskExecutor-1', 
but the last SQL it performed is unknown because the trace property is not enabled.

 

项目用的spring,配置有proxool连接池,这个问题也不怎么大,只是因为操作数据库超过5分钟还没有结束的时候,抛出错误意思是proxool连接池把超过309594 milliseconds的连接给关了,这样配大点就没问题了

 

<bean id="DataSource" class="org.logicalcobwebs.proxool.ProxoolDataSource">
        <property name="driver" value="com.mysql.jdbc.Driver"></property>
        <property name="driverUrl" value="jdbc:mysql://ip:3306/comm?characterEncoding=UTF-8"></property>
        <property name="user" value="contact"></property>
        <property name="password" value="111111"></property>
        <property name="alias" value="contact_pool" />
    	<property name="prototypeCount" value="2" /> 
    	<property name="maximumConnectionCount" value="24" /> 
    	<property name="minimumConnectionCount" value="8" /> 
    	<property name="simultaneousBuildThrottle" value="24" /> 
    	<property name="maximumActiveTime" value="700000" />
    	<property name="houseKeepingSleepTime" value="99000" />
    	<property name="houseKeepingTestSql" value="select 1 from dual" />  
</bean>


 

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值