【问题标题】:javax.ejb.EJBException: JBAS014516: Failed to acquire a permit within 5 MINUTES- Unable to reproduce in testing region by load runnerjavax.ejb.EJBException:JBAS014516:未能在 5 分钟内获得许可 - 负载运行器无法在测试区域中重现
【发布时间】:2017-05-26 07:18:27
【问题描述】:

当多个用户同时打开文档时,我们在生产中遇到问题。[参考下面的跟踪]

    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 错误。

  1. 有人知道“我们如何通过 Load runner 在测试区域重现此错误。

  2. 当配置的 EJB 池耗尽时会发生此错误 - 意味着所有 EJB 当前都“正在使用”(=处理),有人知道我们如何检查 EJB 池大小或 bean,以便我们能够重现问题。

如果需要有关场景和错误的更多信息,请告诉我?

谢谢, 最完美的

【问题讨论】:

    标签: jboss ejb loadrunner


    【解决方案1】:

    要监控 EJB 池,请使用 CLI 启用池统计信息

    /subsystem=ejb3:write-attribute(name=enable-statistics, value=true)

    然后在命令下面运行

    /deployment=xxxx.ear/subdeployment=xx-ejb.jar/subsystem=ejb3/stateless-session-bean=HelloBean:read-resource(include-runtime=true)

    要解决这个问题,你需要增加max-pool-size

    strict-max-pool name="slsb-strict-max-pool" max-pool-size="20" 实例获取超时=“5” instance-acquisition-timeout-unit="MINUTES"/>

    【讨论】:

      【解决方案2】:

      通过增加服务器文件中的核心线程值来解决问题

          <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

      【讨论】:

      • 根据具体情况,这可能会解决问题(尽管它是 max-threads 而不是 core-threads)。但在其他情况下,这种确切的措施也可能使情况恶化。如果 bean 很忙,因为它们正在等待池中的线程,则第一个是正确的。但是增加从池中请求 bean 的线程数根本没有帮助。
      猜你喜欢
      • 2017-11-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-12-21
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多