Weblogic连接池泄漏排查
1、查看Weblogic 的控制台,发现可用数量为0
2、查看日志,报错,获取不到连接
Caused by: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is weblogic.jdbc.extensions.PoolLimitSQLException: weblogic.common.resourcepool.ResourceLimitException: No resources currently available in pool mcmRACDataSource to allocate to applications, please increase the size of the pool and retry..
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:80)
at org.springframework.jdbc.core.support.JdbcDaoSupport.getConnection(JdbcDaoSupport.java:133)
at com.ccb.openframework.persist.jdbc.JdbcPersistenceImpl.currentConnection(JdbcPersistenceImpl.java:269)
at com.ccb.openframework.persist.support.PersistServiceDelegate.getConnection(PersistServiceDelegate.java:407)
at com.ccb.nmcmsq.data.dos.impl.flow.ClrgFlowImpl.checkTable(ClrgFlowImpl.java:120)
at com.ccb.nmcmsq.service.impl.flow.A06410010ServiceImpl.queryClrgFlow(A06410010ServiceImpl.java:74)
at sun.reflect.GeneratedMethodAccessor324.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.ccb.openframework.disphctrl.ReflectionInvoker.doInvoke(ReflectionInvoker.java:190)
at com.ccb.openframework.disphctrl.ReflectionInvoker.invoke(ReflectionInvoker.java:70)
... 83 more
Caused by: weblogic.jdbc.extensions.PoolLimitSQLException: weblogic.common.resourcepool.ResourceLimitException: No resources currently available in pool mcmRACDataSource to allocate to applications, please increase the size of the pool and retry..
at weblogic.jdbc.pool.Driver.connect(Driver.java:153)
at weblogic.jdbc.jts.Driver.getNonTxConnection(Driver.java:662)
at weblogic.jdbc.jts.Driver.connect(Driver.java:128)
at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:111)
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:77)
... 93 more
|
3、从PLSQL工具中查询是哪条SQL的问题
select count(*),v.PREV_SQL_ADDR,v.PREV_HASH_VALUE
from v$session v group by v.PREV_SQL_ADDR,v.PREV_HASH_VALUE
order by count(*) desc ;
select * from v$sql s where s.ADDRESS='00007FF7806F68C8' and s.HASH_VALUE='2015143317';
4、查代码,知道是哪个交易报的错误,明确是没有Close连接的原因。
5、虽然知道是没有close的原因,从工程里面看来使用spring来管理,应该由spring来负责关闭才对,但实际上没有。
6、测试了N轮后,发现通过getBean获取出来的对象,执行后,居然不会自动关闭