Jboss javax.ejb.EJBException:JBAS014516:未能在5分钟内获得许可证-无法通过load runner在测试区域中复制
多个用户同时打开文档时,我们在生产中遇到问题。[请参阅下面的跟踪]Jboss javax.ejb.EJBException:JBAS014516:未能在5分钟内获得许可证-无法通过load runner在测试区域中复制,jboss,ejb,loadrunner,Jboss,Ejb,Loadrunner,多个用户同时打开文档时,我们在生产中遇到问题。[请参阅下面的跟踪] ERROR [org.jboss.as.ejb3.invocation] (http-/xx.xx.xx.xxx:xxxx-xxx) JBAS014134: EJB Invocation failed on component xxxxxx for method public abstract java.lang.String com.xxxxxxx.xxx.ejb.services.encryptionfile.xxx
ERROR [org.jboss.as.ejb3.invocation] (http-/xx.xx.xx.xxx:xxxx-xxx) JBAS014134: EJB Invocation failed on component xxxxxx for method public abstract java.lang.String com.xxxxxxx.xxx.ejb.services.encryptionfile.xxxxxx.xxxxxx(java.lang.String): javax.ejb.EJBException: JBAS014516: Failed to acquire a permit within 5 MINUTES
at org.jboss.as.ejb3.pool.strictmax.StrictMaxPool.get(StrictMaxPool.java:109) [jboss-as-ejb3-7.5.4.Final-redhat-4.jar:7.5.4.Final-redhat-4]
at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:47) [jboss-as-ejb3-7.5.4.Final-redhat-4.jar:7.5.4.Final-redhat-4]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:278) [jboss-as-ejb3-7.5.4.Final-redhat-4.jar:7.5.4.Final-redhat-4]
at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:330) [jboss-as-ejb3-7.5.4.Final-redhat-4.jar:7.5.4.Final-redhat-4]
at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:242) [jboss-as-ejb3-7.5.4.Final-redhat-4.jar:7.5.4.Final-redhat-4]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41) [jboss-as-ejb3-7.5.4.Final-redhat-4.jar:7.5.4.Final-redhat-4]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
at org.jboss.as.ejb3.component.invocationmetrics.WaitTimeInterceptor.processInvocation(WaitTimeInterceptor.java:43) [jboss-as-ejb3-7.5.4.Final-redhat-4.jar:7.5.4.Final-redhat-4]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64) [jboss-as-ejb3-7.5.4.Final-redhat-4.jar:7.5.4.Final-redhat-4]
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]
at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59) [jboss-as-ejb3-7.5.4.Final-redhat-4.jar:7.5.4.Final-redhat-4]
我试图在性能区域再现错误。最初我遇到了Java堆空间问题,后来通过在Jboss配置文件中增加堆大小解决了这个问题
然而,我无法通过Load runner[150并发用户命中]在测试区域再现实际的prod错误
perftest要监视EJB池,请使用CLI启用池统计信息 /subsystem=ejb3:write属性(name=enable statistics,value=true) 然后运行下面的命令 /deployment=xxxx.ear/subdeployment=xx ejb.jar/subsystem=ejb3/无状态会话bean=HelloBean:read resource(include runtime=true) 要解决此问题,您需要增加
最大池大小
strict max pool name=“slsb strict max pool”max pool size=“20”
实例获取超时=“5”
实例获取超时单位=“分钟”/>
要监视EJB池,请使用CLI启用池统计信息 /subsystem=ejb3:write属性(name=enable statistics,value=true) 然后运行下面的命令 /deployment=xxxx.ear/subdeployment=xx ejb.jar/subsystem=ejb3/无状态会话bean=HelloBean:read resource(include runtime=true) 要解决此问题,您需要增加
最大池大小
strict max pool name=“slsb strict max pool”max pool size=“20”
实例获取超时=“5”
实例获取超时单位=“分钟”/>
通过增加服务器文件中的核心线程值可以解决此问题
<short-running-threads>
<core-threads count="150"/>
<queue-length count="150"/>
<max-threads count="150"/>
<keep-alive-time time="10" unit="seconds"/>
</short-running-threads>
<long-running-threads>
<core-threads count="150"/>
<queue-length count="150"/>
<max-threads count="150"/>
<keep alive-time time="10" unit="seconds"/>
</long-running-threads>
通过增加服务器文件中的核心线程值,可以解决将值从50增加到150的问题
<short-running-threads>
<core-threads count="150"/>
<queue-length count="150"/>
<max-threads count="150"/>
<keep-alive-time time="10" unit="seconds"/>
</short-running-threads>
<long-running-threads>
<core-threads count="150"/>
<queue-length count="150"/>
<max-threads count="150"/>
<keep alive-time time="10" unit="seconds"/>
</long-running-threads>
根据具体情况将值从50增加到150,这可能会解决问题(尽管它是最大线程而不是核心线程)。但在其他情况下,这种精确的措施也可能使情况恶化。如果bean正忙着,因为它们正在池中等待线程,则第一种情况是正确的。但增加从池中请求bean的线程数根本没有帮助。根据具体情况,这可能会解决问题(虽然这是最大线程数,而不是核心线程数)。但在其他情况下,这种精确的度量也可能使情况恶化。如果bean正忙着等待池中的线程,则第一种情况是正确的。但是增加从池中请求bean的线程数根本没有帮助。