Troubleshooting
Problem
Out of resource error in application logs >How to track Connection Leak //dbconnection running out, pool filling up, not closed
Symptom
PART: Yantra 5.0 SP2
We are seeing a weblogic Out of resource error in
our weblogic nohup.out files.
We need to know if this is a problem and
also correct this if possible
weblogic.common.ResourceException: No
resources available
at
weblogic.common.internal.ResourceAllocator.reserve(ResourceAllocator.java:568)<b
r> at
weblogic.common.internal.ResourceAllocator.reserve(ResourceAllocator.java:400)<b
r> at
weblogic.common.internal.ResourceAllocator.reserveNoWait(ResourceAllocator.java:
368)
at
weblogic.jdbc.common.internal.ConnectionPool.reserve(ConnectionPool.java:166)<br
> at
weblogic.jdbc.common.internal.ConnectionPool.reserveNoWait(ConnectionPool.java:1
27)
at
weblogic.jdbc.common.internal.RmiDataSource.getPoolConnection(RmiDataSource.java
:194)
at
weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:219
)
at
com.yantra.yfs.core.YFSContext.createConnection(YFSContext.java:541)
at
com.yantra.yfs.core.YFSContext.<init>(YFSContext.java:135)
at
com.yantra.yfs.core.YFSContext.<init>(YFSContext.java:104)
at
com.yantra.interop.util.YFSContextManager.getContextFor(YFSContextManager.java:9
6)
at
com.yantra.interop.services.api.ApiHelper.invoke(ApiHelper.java:89)
at
com.yantra.interop.services.api.ApiRequestDispatcher.modifyOrder(ApiRequestDispa
tcher.java:1409)
at
com.CustXYZ.yantra.sreceipt.SerialNumber_OTC.modifyOrder(SerialNumber_OTC.java:1
384)
...
at
jsp_servlet._yfsconsole._bin._CustXYZ.__SerialNoProcess._jspService(__SerialNoPr
ocess.java:113)
at
weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265
)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200
)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContex
t.java:2495)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:220
4)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at
weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
Could not use
datasourcename. Trying alternate connection mechanism using JDBC URL
Cause
Resolving The Problem
Monitor the Connection Pool usage using the Weblogic console.
1. The
ExecuteThreadCount screen shows how you can monitor queue length over time -
this will let you see when the requests on the server peaked and users were
waiting until their trequest could be handled.
2. The Exceute Queue screens
show how you can see the queuelength for a given point of time.
3. Check if
Shrink is enabled on Weblogic. If this setting is not found in the Config.xml,
it may still be the default, So explicity uncheck and check Shrink Allowed and
Shrink period. Config.xml will get updated.
4. In yfs.properties files
introduce this property
yfs.app.traceleaks=Y
after this restart
weblogic.
Now in the applog or nohup look for the string - Connection
leak
You will see a signature like
2037608 [Finalizer] ERROR
YFSDEFAULT -