5 Replies Latest reply on Jun 18, 2015 4:36 AM by ckuester

    JBoss EAP 6.3.2.GA – EJB 3.1 – Resources - Problem

    ckuester

      Hi,

       

      We use the JBoss EAP 6.3.2.GA Server with the following enfironment values:  JAVA_OPTS: -Xms2048m -Xmx2048m -XX:MaxPermSize=256m

       

      After some time, the response times are getting longer and later we get a memory error (heap space)

       

      We have change the  EJB 3.1 configuration in the standalone-full.xml <pools>   <remote connector-ref>  and thread-pools

       

      Is this EJB 3. 1 configration correct for EAP6.3.2 Server or the memory is too low?

      Does anyone havean idea or needs additional information?


       

      Here the full EJB- configuration:

      <subsystem xmlns="urn:jboss:domain:ejb3:1.4">

                  <session-bean>

                      <stateless>

                          <bean-instance-pool-ref pool-name="slsb-strict-max-pool"/>

                      </stateless>

                      <stateful default-access-timeout="5000" cache-ref="simple"/>

                      <singleton default-access-timeout="5000"/>

                  </session-bean>

                  <mdb>

                      <resource-adapter-ref resource-adapter-name="${ejb.resource-adapter-name:hornetq-ra}"/>

                      <bean-instance-pool-ref pool-name="mdb-strict-max-pool"/>

                  </mdb>

                 <pools>

                      <bean-instance-pools>

                          <strict-max-pool name="slsb-strict-max-pool" max-pool-size="1300" instance-acquisition-timeout="1" instance-acquisition-timeout-unit="MILLISECONDS"/>

                          <strict-max-pool name="mdb-strict-max-pool" max-pool-size="180" instance-acquisition-timeout="1" instance-acquisition-timeout-unit="MILLISECONDS"/>

                      </bean-instance-pools>

                  </pools>

                  <caches>

                      <cache name="simple" aliases="NoPassivationCache"/>

                      <cache name="passivating" passivation-store-ref="file" aliases="SimpleStatefulCache"/>

                  </caches>

                  <passivation-stores>

                      <file-passivation-store name="file"/>

                  </passivation-stores>

                  <async thread-pool-name="default"/>

                  <timer-service thread-pool-name="default">

                      <data-store path="timer-service-data" relative-to="jboss.server.data.dir"/>

                  </timer-service>

                  <remote connector-ref="remoting-connector" thread-pool-name="default">

                   <channel-creation-options>

                            <option name="WORKER_READ_THREADS" value="2" type="xnio"/>

                            <option name="WORKER_WRITE_THREADS" value="2" type="xnio"/>

                            <option name="MAX_INBOUND_MESSAGES" value="165" type="remoting"/>

                            <option name="MAX_OUTBOUND_MESSAGES" value="165" type="remoting"/>

                    </channel-creation-options>

                  </remote> 

                  <thread-pools>

                      <thread-pool name="default">

                          <max-threads count="165"/>

                          <keepalive-time time="75" unit="minutes"/>

                      </thread-pool>

                  </thread-pools>

                  <iiop enable-by-default="false" use-qualified-name="false"/>

                  <default-security-domain value="other"/>

      <default-missing-method-permissions-deny-access value="true"/>

              </subsystem>

        • 1. Re: JBoss EAP 6.3.2.GA – EJB 3.1 – Resources - Problem
          lylewang

          The slsb instance pool size is set very big (1300), compared to the thread pool (165)


          <strict-max-pool name="slsb-strict-max-pool" max-pool-size="1300"

          ......

          <thread-pool name="default">

                              <max-threads count="165"/>

           

          How did you come to these configuration numbers ?

          How many concurrent requests / connections are you expecting to host ?

          Any heavy / time-consuming tasks to be done on the EJB server end ?

          Have you run into any issue when using out-of-box default values ?

           

          http://planet.jboss.org/post/jboss_as_7_0_1_configuring_ejb3_pools

           

           

          the response times are getting longer and later we get a memory error (heap space)

           

          This sounds like some GC issue and finally you got OOME ?

          This might be caused by holding a great amount of bean instances in the pool (hence holding a lot of mem.), if not, then you want a heap dump analysis.

           

          If you've got Red Hat subscription for your EAP please open a support case.

          • 2. Re: JBoss EAP 6.3.2.GA – EJB 3.1 – Resources - Problem
            wdfink

            Note that the SLSB pool 1300 mean you have 1300 instances of each type of SLSB in your application.

            You should start with the default configuration and only change one value each time and measure it if the invocations are stalled and the system still have enough resources to handle more.

            And that after reading the documentation and tuning tips.

             

            First is to enable the statistics for ejb and check whether the pool is your bottleneck

            • 3. Re: JBoss EAP 6.3.2.GA – EJB 3.1 – Resources - Problem
              ckuester

              We have started with the default values

              The system becomes slower at higher load and there are exception on at the timer-modules and later heap space exception.

              From a RedHat Document we have removed these settings.After this setting, the server is running better, but has under heavy load, takes the login for a long time.

              I have the impression that the timers are those who caused the problem.


              Do you have any tips for tuning EJB configuration?

              • 4. Re: JBoss EAP 6.3.2.GA – EJB 3.1 – Resources - Problem
                wdfink

                Did you measure the CPU load? Could it be that your machine is not able to handle more load?

                As you talking about timer-modules exceptions and heap space exceptions you should elaborate on this otherwise our help is very generic

                • 5. Re: JBoss EAP 6.3.2.GA – EJB 3.1 – Resources - Problem
                  ckuester

                  I have the problem found.

                  It was the oracle driver. With the latest driver (ojdbc7), is the problem no longer occurs.