赞
踩
removeAbandonedTimeout 设置的时间太短导致,对应的调整一下时间就可以了。
- <bean id="dataSource" class="org.apache.commons.dbcp2.BasicDataSource"
- destroy-method="close">
- <property name="driverClassName" value="org.postgresql.Driver"/>
- <property name="url" value="jdbc:postgresql://192.168.0.1:5432/DB1"/>
- <property name="username" value="username"/>
- <property name="password" value="password"/>
-
- <property name="initialSize" value="310"/>
- <property name="maxTotal" value="310"/>
- <property name="maxIdle" value="310"/>
- <property name="maxWaitMillis" value="30000"/>
-
-
- <property name="removeAbandonedOnBorrow" value="true"/>
- <!-- Timeout时间太短 -->
- <!-- <property name="removeAbandonedTimeout" value="30"/> -->
- <property name="removeAbandonedTimeout" value="43200"/>
- <property name="logAbandoned" value="true"/>
-
-
- </bean>
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。