1 Reply Latest reply on Jul 11, 2014 4:10 PM by Sebastiao Santos

    JBAS014516: Failed to acquire a permit within 5 MINUTES

    Chris Stillwell Newbie

      I am currently running wildfly 8.1.0CR1 but I have seen this exception in other releases as well.  It seems to happen when memory comes under stress.  I gather that the StrictMaxPool is configured in the standalone.xml by this configuration:

       

                  <pools>
                      <bean-instance-pools>
                          <!-- A sample strict max pool configuration -->
                          <strict-max-pool name="slsb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>
                          <strict-max-pool name="mdb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>
                      </bean-instance-pools>
                  </pools>

       

      Just so I understand, when I get this timeout exception it tells me that I had 20 active concurrent requests on my session bean with some other number of requests blocked on the Semaphore contained in the StrictMaxPool, correct?  I am wondering if there is any way I can add a user hook in this call chain such that when this exception is thrown I can force a thread dump so I can see where all the requests are blocking?

       

       

      2014-05-17 02:06:42,916 ERROR [org.jboss.as.ejb3.invocation] (EJB default - 50) JBAS014134: EJB Invocation failed on component InternationalFareMixerModuleSessionBean for method public abstract java.util.List com.farecompare.atpcore.faremixermodule.api.AbstractFareMixerModuleAPI.getMergedFares(com.xxi.framework.securitycredentialmodule.api.data.SecurityCredential,java.lang.String,java.lang.String,java.lang.String,com.xxi.framework.travel.data.airfare.AtpQueryContext,com.xxi.atpcore.records.util.RuleCategories,boolean) throws com.farecompare.atpcore.rulemergemodule.api.exceptions.RuleMergeModuleException: javax.ejb.EJBException: JBAS014516: Failed to acquire a permit within 5 MINUTES

              at org.jboss.as.ejb3.pool.strictmax.StrictMaxPool.get(StrictMaxPool.java:109) [wildfly-ejb3-8.1.0.CR1.jar:8.1.0.CR1]

              at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:47) [wildfly-ejb3-8.1.0.CR1.jar:8.1.0.CR1]

              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)

              at org.jboss.as.ejb3.remote.EJBRemoteTransactionPropagatingInterceptor.processInvocation(EJBRemoteTransactionPropagatingInterceptor.java:79) [wildfly-ejb3-8.1.0.CR1.jar:8.1.0.CR1]

              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)

              at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41) [wildfly-ejb3-8.1.0.CR1.jar:8.1.0.CR1]

              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)

              at org.jboss.as.ejb3.component.invocationmetrics.WaitTimeInterceptor.processInvocation(WaitTimeInterceptor.java:43) [wildfly-ejb3-8.1.0.CR1.jar:8.1.0.CR1]

              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)

              at org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:95) [wildfly-ejb3-8.1.0.CR1.jar:8.1.0.CR1]

              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)

              at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64) [wildfly-ejb3-8.1.0.CR1.jar:8.1.0.CR1]

              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)

              at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59) [wildfly-ejb3-8.1.0.CR1.jar:8.1.0.CR1]

              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)

              at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)

              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)

              at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:55) [wildfly-ejb3-8.1.0.CR1.jar:8.1.0.CR1]

              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)

              at org.jboss.invocation.ContextClassLoaderInterceptor.processInvocation(ContextClassLoaderInterceptor.java:64)

              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)

              at org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:326)

              at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:448)

              at org.jboss.invocation.AccessCheckingInterceptor.processInvocation(AccessCheckingInterceptor.java:61)

              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)

              at org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:326)

              at org.jboss.invocation.PrivilegedWithCombinerInterceptor.processInvocation(PrivilegedWithCombinerInterceptor.java:80)

              at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)

              at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)

              at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:185)

              at org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler.invokeMethod(MethodInvocationMessageHandler.java:330) [wildfly-ejb3-8.1.0.CR1.jar:8.1.0.CR1]

              at org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler.access$100(MethodInvocationMessageHandler.java:70) [wildfly-ejb3-8.1.0.CR1.jar:8.1.0.CR1]

              at org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler$1.run(MethodInvocationMessageHandler.java:203) [wildfly-ejb3-8.1.0.CR1.jar:8.1.0.CR1]

              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [rt.jar:1.8.0]

              at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0]

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0]

              at java.lang.Thread.run(Thread.java:744) [rt.jar:1.8.0]

              at org.jboss.threads.JBossThread.run(JBossThread.java:122)