glassfish
  1. glassfish
  2. GLASSFISH-14746

EJB container monitoring statictics on "methodreadycount-current" is not correct.

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Cannot Reproduce
    • Affects Version/s: 3.1
    • Fix Version/s: not determined
    • Component/s: ejb_container
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      14,746

      Description

      EJB container monitoring statictics on "methodreadycount-current" is not correct.

      Step to reproduce.
      1. Create a simple cluster instance. ( create cluster, create one instance in
      this cluster)
      2. Set monitoring for ejb contianer high.
      (monitoring-cluster.monitoring-service.module-monitoring-levels.ejb-container=HIGH)
      3. Deploy a ejbslapp1.ear to the cluster.
      4. Access the app through url 10 times.
      5. use asadmin command to get the "methodreadycount-current".

      /Users/homeryau/glassfish3/glassfish/bin/asadmin get -m
      monitoring-server.server.applications.ejbslapp1.ejbslapp1ejbmod1\.jar.SLApp1EJB1.methodreadycount-current
      0 :
      XXXXXXXXX

      Pattern=[server.applications.ejbslapp1.ejbslapp1ejbmod1\.jar.SLApp1EJB1.methodreadycount-current]
      Server=[monitoring-server]

      monitoring-server :

      XXXXXXXXX

      Pattern=[server.applications.ejbslapp1.ejbslapp1ejbmod1\.jar.SLApp1EJB1.methodreadycount-current]
      No Targets

      monitoring-server.server.applications.ejbslapp1.ejbslapp1ejbmod1\.jar.SLApp1EJB1.methodreadycount-current
      = 5

      Command get executed successfully.

      6. Test failed since it only show 5 instead of 10.

      Pass pattern didnot match
      Pass Pattern Expected
      :monitoring-server.server.applications.ejbslapp1.ejbslapp1ejbmod1\.jar.SLApp1EJB1.methodreadycount-current
      = 10
      Test FAILED

      Detail during runtime of the test case:

      Loading test:
      /Users/homeryau/31_trunk_fcs_ws/appserver-sqe/se/admincli/monitoring/monitoringTests/ejbpool_10.xml
      Starting Test ########### Mon Nov 15 14:02:08 PST 2010 ############
      Loading Test :
      /var/folders/BU/BUXlZ+G7F0KaMI4fnCuk5E+++TI/Tmp/runTime_5090509912207848741.parsed
      Entering runTests method
      Test ID : ejbpool_10
      Test Description : get the MethodReadyCount attribute of the SL EJB
      /Users/homeryau/glassfish3/glassfish/bin/asadmin set
      monitoring-cluster.monitoring-service.module-monitoring-levels.ejb-container=HIGH
      0 : monitoring-server :
      monitoring-cluster.monitoring-service.module-monitoring-levels.ejb-container=HIGH

      monitoring-cluster.monitoring-service.module-monitoring-levels.ejb-container=HIGH
      Command set executed successfully.

      /Users/homeryau/glassfish3/glassfish/bin/asadmin deploy --target
      monitoring-cluster
      /Users/homeryau/31_trunk_fcs_ws/appserver-sqe/common/admincli/monitoring/build/ear/ejbslapp1.ear
      0 : Application deployed with name ejbslapp1.
      Command deploy executed successfully.

      command :
      HttpClient :10 client(s) and 1 iterations
      get http://homer-yaus-macbook-pro.local:52541/ejbslapp1/SLApp1Servlet1?sleepTime=5
      noOfIterations1
      noOfIterations1
      noOfIterations1
      noOfIterations1
      noOfIterations1
      noOfIterations1
      noOfIterations1
      noOfIterations1
      noOfIterations1
      noOfIterations1
      Response Code: 200
      Response Code: 200
      Response Code: 200
      Response Code: 200
      Response Code: 200
      Response Code: 200
      Response Code: 200
      Response Code: 200
      Response Code: 200
      Response Code: 200
      In sleepNode method
      Sleeping for :3
      /Users/homeryau/glassfish3/glassfish/bin/asadmin get -m
      monitoring-server.server.applications.ejbslapp1.ejbslapp1ejbmod1\.jar.SLApp1EJB1.methodreadycount-current
      0 :
      XXXXXXXXX

      Pattern=[server.applications.ejbslapp1.ejbslapp1ejbmod1\.jar.SLApp1EJB1.methodreadycount-current]
      Server=[monitoring-server]

      monitoring-server :

      XXXXXXXXX

      Pattern=[server.applications.ejbslapp1.ejbslapp1ejbmod1\.jar.SLApp1EJB1.methodreadycount-current]
      No Targets
      monitoring-server.server.applications.ejbslapp1.ejbslapp1ejbmod1\.jar.SLApp1EJB1.methodreadycount-current
      = 5

      Command get executed successfully.

      /Users/homeryau/glassfish3/glassfish/bin/asadmin set
      monitoring-cluster.monitoring-service.module-monitoring-levels.ejb-container=OFF
      0 : monitoring-server :
      monitoring-cluster.monitoring-service.module-monitoring-levels.ejb-container=OFF

      monitoring-cluster.monitoring-service.module-monitoring-levels.ejb-container=OFF
      Command set executed successfully.

      /Users/homeryau/glassfish3/glassfish/bin/asadmin undeploy --target
      monitoring-cluster ejbslapp1
      0 : Command undeploy executed successfully.

      Pass pattern didnot match
      Pass Pattern Expected
      :monitoring-server.server.applications.ejbslapp1.ejbslapp1ejbmod1\.jar.SLApp1EJB1.methodreadycount-current
      = 10
      Test FAILED
      Ending Test ########### 2:2:38 ############

        Activity

        Hide
        Homer Yau added a comment -

        Created an attachment (id=5497)
        EJB test case ejbslapp1.ear

        Show
        Homer Yau added a comment - Created an attachment (id=5497) EJB test case ejbslapp1.ear
        Hide
        marina vatkina added a comment -

        If I run the test via http://localhost:8080/ejbslapp1/SLApp1Servlet1 and hitting
        reload, and do 'asadmin get -m "*" | grep current' the output is 1 and *it's the
        same* as the size of the pool:

        server.applications.ejbslapp1.ejbslapp1ejbmod1\.jar.SLApp1EJB1.bean-pool.numbeansinpool-current
        = 1
        server.applications.ejbslapp1.ejbslapp1ejbmod1\.jar.SLApp1EJB1.bean-pool.numthreadswaiting-current
        = 0
        server.applications.ejbslapp1.ejbslapp1ejbmod1\.jar.SLApp1EJB1.methodreadycount-current
        = 1

        This is expected because for the SLSB methodreadycount returns the size of the pool.

        The fact that you saw 5 would mean that you had (because of an automation?) 5
        requests served at one time, and all those beans were returned to the pool.

        maxPoolSize defaults to 0, which actually mean an un-bound bean pool, but
        resizeQuantity 0 (also a default) means that the pool is never reduced back (for
        better or worse it's the same as in v2).

        I'll close it as works for me, or it can be (reopened and) closed as a duplicate
        of https://glassfish.dev.java.net/issues/show_bug.cgi?id=9856

        Show
        marina vatkina added a comment - If I run the test via http://localhost:8080/ejbslapp1/SLApp1Servlet1 and hitting reload, and do 'asadmin get -m "*" | grep current' the output is 1 and *it's the same* as the size of the pool: server.applications.ejbslapp1.ejbslapp1ejbmod1\.jar.SLApp1EJB1.bean-pool.numbeansinpool-current = 1 server.applications.ejbslapp1.ejbslapp1ejbmod1\.jar.SLApp1EJB1.bean-pool.numthreadswaiting-current = 0 server.applications.ejbslapp1.ejbslapp1ejbmod1\.jar.SLApp1EJB1.methodreadycount-current = 1 This is expected because for the SLSB methodreadycount returns the size of the pool. The fact that you saw 5 would mean that you had (because of an automation?) 5 requests served at one time, and all those beans were returned to the pool. maxPoolSize defaults to 0, which actually mean an un-bound bean pool, but resizeQuantity 0 (also a default) means that the pool is never reduced back (for better or worse it's the same as in v2). I'll close it as works for me, or it can be (reopened and) closed as a duplicate of https://glassfish.dev.java.net/issues/show_bug.cgi?id=9856
        Hide
        Homer Yau added a comment -

        I have 10 client not 5.

        Should we expect to have 10 return in "methodreadycount-current"?

        Show
        Homer Yau added a comment - I have 10 client not 5. Should we expect to have 10 return in "methodreadycount-current"?
        Hide
        marina vatkina added a comment -

        I think that by default GF serves only 5 threads. What does the
        numbeansinpool-current return?

        Show
        marina vatkina added a comment - I think that by default GF serves only 5 threads. What does the numbeansinpool-current return?
        Hide
        marina vatkina added a comment -

        Please reopen if my explanation about the value 5 is not right.

        Show
        marina vatkina added a comment - Please reopen if my explanation about the value 5 is not right.

          People

          • Assignee:
            marina vatkina
            Reporter:
            Homer Yau
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: