commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phil Steitz <phil.ste...@gmail.com>
Subject Re: Apache Commons Pool performance issue
Date Thu, 05 Sep 2013 16:15:51 GMT
What version of [pool] are you running?

Phil

On 9/5/13 9:08 AM, Programmer wrote:
> Hi,
>
> We use Spring LDAP for LDAP connection pooling in our application. Spring
> LDAP in turn uses apache commons pool API for managing its connection pool. 
>
> On testing our application for performance, we find stuck threads at our
> weblogic thread dump. It appears that when the connection pool is exhausted
> and request for new connection objects are not rejected by apache commons
> with a NoSuchElement exception.
>
> Please advise on the problem
>
> *
> Here is our connection pool configuration:*
>
> /<bean id="contextSource"
> class="org.springframework.ldap.pool.factory.PoolingContextSource">
>   <property name="contextSource" ref="contextSourceTarget" /> 
>   <property name="dirContextValidator" ref="dirContextValidator" /> 
>   <property name="testOnBorrow" value="true" /> 
>   <property name="testWhileIdle" value="true" /> 
>   <property name="maxActive" value="10" /> 
> - <property name="whenExhaustedAction">
>   <ref
> bean="org.apache.commons.pool.impl.GenericObjectPool.WHEN_EXHAUSTED_FAIL" /> 
>   </property>
>   </bean>/
>
> *
> Here is the weblogic thread dump:*
>
>          "[ACTIVE] ExecuteThread: '34' for queue: 'weblogic.kernel.Default
> (self-tuning)'" waiting for lock
> org.apache.commons.pool.impl.GenericKeyedObjectPool@6e812376 WAITING
>           
>             	java.lang.Object.wait(Native Method)
>           
>             	java.lang.Object.wait(Object.java:485)
>           
>             
> org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:812)
>           
>             
> org.springframework.ldap.pool.factory.PoolingContextSource.getContext(PoolingContextSource.java:422)
>           
>             
> org.springframework.ldap.pool.factory.PoolingContextSource.getReadOnlyContext(PoolingContextSource.java:401)
>           
>             
> org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:287)
>           
>             
> org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:237)
>           
>             
> org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:624)
>           
>             
> org.springframework.ldap.core.LdapTemplate.search(LdapTemplate.java:535)
>           
>             
> org.springframework.ldap.odm.core.impl.OdmManagerImpl.search(OdmManagerImpl.java:246)
>           
>             
> com.rogers.yyy.servicebean.BaseServiceBean.queryDO(BaseServiceBean.java:148)
>           
>             
> com.rogers.yyy.servicebean.OdmRoleServiceBean.queryRolXXXorDN(OdmRoleServiceBean.java:43)
>           
>             
> com.rogers.yyy.ruleengine.RuleEngineManagerImpl.testoperation(RuleEngineManagerImpl.java:560)
>           
>             	sun.reflect.GeneratedMethodAccessor197.invoke(Unknown Source)
>           
>             
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>           
>             	java.lang.reflect.Method.invoke(Method.java:597)
>           
>             
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
>           
>             
> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
>           
>             
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
>           
>             
> org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80)
>           
>             
> com.rogers.yyy.aspects.LoggerAspect.profile(LoggerAspect.java:45)
>           
>             	sun.reflect.GeneratedMethodAccessor112.invoke(Unknown Source)
>           
>             
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>           
>             	java.lang.reflect.Method.invoke(Method.java:597)
>           
>             
> org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621)
>           
>             
> org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610)
>           
>             
> org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65)
>           
>             
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
>           
>             
> org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
>           
>             
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
>           
>             
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
>           
>             	$Proxy96.testoperation(Unknown Source)
>           
>             	sun.reflect.GeneratedMethodAccessor196.invoke(Unknown Source)
>           
>             
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>           
>             	java.lang.reflect.Method.invoke(Method.java:597)
>           
>             
> com.rogers.yyy.serviceHandlers.yyyServiceHandlerAbstract.handle(yyyServiceHandlerAbstract.java:48)
>           
>             	sun.reflect.GeneratedMethodAccessor111.invoke(Unknown Source)
>           
>             
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>           
>             	java.lang.reflect.Method.invoke(Method.java:597)
>           
>             
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
>           
>             
> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
>           
>             
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
>           
>             
> org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80)
>           
>             
> com.rogers.yyy.aspects.LoggerAspect.logRequestResponse(LoggerAspect.java:176)
>           
>             	sun.reflect.GeneratedMethodAccessor110.invoke(Unknown Source)
>           
>             
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>           
>             	java.lang.reflect.Method.invoke(Method.java:597)
>           
>             
> org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621)
>           
>             
> org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610)
>           
>             
> org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65)
>           
>             
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
>           
>             
> org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
>           
>             
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
>           
>             
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
>           
>             	$Proxy97.handle(Unknown Source)
>           
>             
> com.rogers.yyy.XXXyyywebservice.XXXyyyWebService_XXXyyyWebServiceSOAPImpl.testoperation(XXXyyyWebService_XXXyyyWebServiceSOAPImpl.java:195)
>           
>             	sun.reflect.GeneratedMethodAccessor195.invoke(Unknown Source)
>           
>             
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>           
>             	java.lang.reflect.Method.invoke(Method.java:597)
>           
>             
> weblogic.wsee.jaxws.WLSInstanceResolver$WLSInvoker.invoke(WLSInstanceResolver.java:92)
>           
>             
> weblogic.wsee.jaxws.WLSInstanceResolver$WLSInvoker.invoke(WLSInstanceResolver.java:74)
>           
>             
> com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:151)
>           
>             
> com.sun.xml.ws.server.sei.EndpointMethodHandlerImpl.invoke(EndpointMethodHandlerImpl.java:268)
>           
>             
> com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTube.java:100)
>           
>             	com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:866)
>           
>             	com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:815)
>           
>             	com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:778)
>           
>             	com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:680)
>           
>             
> com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:403)
>           
>             
> com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:532)
>           
>             
> com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:253)
>           
>             
> com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:140)
>           
>             
> weblogic.wsee.jaxws.WLSServletAdapter.handle(WLSServletAdapter.java:171)
>           
>             
> weblogic.wsee.jaxws.HttpServletAdapter$AuthorizedInvoke.run(HttpServletAdapter.java:708)
>           
>             
> weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
>           
>             
> weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
>           
>             
> weblogic.wsee.util.ServerSecurityHelper.authenticatedInvoke(ServerSecurityHelper.java:103)
>           
>             
> weblogic.wsee.jaxws.HttpServletAdapter$3.run(HttpServletAdapter.java:311)
>           
>             
> weblogic.wsee.jaxws.HttpServletAdapter.post(HttpServletAdapter.java:336)
>           
>             
> weblogic.wsee.jaxws.JAXWSServlet.doRequest(JAXWSServlet.java:95)
>           
>             
> weblogic.servlet.http.AbstractAsyncServlet.service(AbstractAsyncServlet.java:99)
>           
>             	javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>           
>             
> weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
>           
>             
> weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
>           
>             
> weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
>           
>             
> weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:183)
>           
>             
> weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3717)
>           
>             
> weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
>           
>             
> weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
>           
>             
> weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
>           
>             
> weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
>           
>             
> weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
>           
>             
> weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
>           
>             	weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
>           
>             	weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
>
>
>
>
>
> --
> View this message in context: http://apache-commons.680414.n4.nabble.com/Apache-Commons-Pool-performance-issue-tp4653614.html
> Sent from the Commons - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message