Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-21012

[GSS](7.3.z) JBJCA-1422 - MaxWaitCount will be counted one less than waiting requests

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.3.8.CR1, 7.3.8.GA
    • 7.3.5.GA
    • JCA
    • None
    • False
    • False
    • +
    • Undefined
    • Hide

      1. statistics and pool setting

      /subsystem=datasources/data-source=ExampleDS:write-attribute(name=statistics-enabled,value=true)
      /subsystem=datasources/data-source=ExampleDS:write-attribute(name=max-pool-size, value=1)
      /subsystem=datasources/data-source=ExampleDS:write-attribute(name=min-pool-size, value=1)
      :reload
      

      2. build and deploy reproducer

      $ unzip h2.zip
      $ cd h2
      $ mvn package wildfly:deploy
      

      3. Send 1st request.

      $ curl -v http://localhost:8080/h2/sleep
      

      InUseCount is incremented and MaxWaitCount is still 0.

      [standalone@localhost:9990 /] /subsystem=datasources/data-source=ExampleDS/statistics=pool:read-resource(include-runtime=true)
      {
          "outcome" => "success",
          "result" => {
              "ActiveCount" => 1,
              "AvailableCount" => 0,
              ...
              "InUseCount" => 1,
              ...
              "MaxWaitCount" => 0,
      

      4. Send 2nd request before the 1st request finished.

      $ curl -v http://localhost:8080/h2/sleep
      

      You can see the MaxWaitCount returns 0 even though the waiting thread is exists.

      [standalone@localhost:9990 /] /subsystem=datasources/data-source=ExampleDS/statistics=pool:read-resource(include-runtime=true)
      {
          "outcome" => "success",
          "result" => {
              "ActiveCount" => 1,
              "AvailableCount" => 0,
              ...
              "InUseCount" => 1,
              ...
              "MaxWaitCount" => 0,
      
      Show
      1. statistics and pool setting /subsystem=datasources/data-source=ExampleDS:write-attribute(name=statistics-enabled,value= true ) /subsystem=datasources/data-source=ExampleDS:write-attribute(name=max-pool-size, value=1) /subsystem=datasources/data-source=ExampleDS:write-attribute(name=min-pool-size, value=1) :reload 2. build and deploy reproducer $ unzip h2.zip $ cd h2 $ mvn package wildfly:deploy 3. Send 1st request. $ curl -v http: //localhost:8080/h2/sleep InUseCount is incremented and MaxWaitCount is still 0. [standalone@localhost:9990 /] /subsystem=datasources/data-source=ExampleDS/statistics=pool:read-resource(include-runtime= true ) { "outcome" => "success" , "result" => { "ActiveCount" => 1, "AvailableCount" => 0, ... "InUseCount" => 1, ... "MaxWaitCount" => 0, 4. Send 2nd request before the 1st request finished. $ curl -v http: //localhost:8080/h2/sleep You can see the MaxWaitCount returns 0 even though the waiting thread is exists. [standalone@localhost:9990 /] /subsystem=datasources/data-source=ExampleDS/statistics=pool:read-resource(include-runtime= true ) { "outcome" => "success" , "result" => { "ActiveCount" => 1, "AvailableCount" => 0, ... "InUseCount" => 1, ... "MaxWaitCount" => 0,

      'MaxWaitCount' as DataSource statistics [1] means that the maximum number of requests waiting for a connection at the same time.
      But Actually that is one less than waiting thread counts.

      [1] https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.3/html/configuration_guide/reference_material#reference_of_datasource_statistics

      The MaxWaitCount returns the value like the following examples.

      • max-pool-size = 1, InUseCount = 1, waiting thread 1 -> MaxWaitCount = 0.
      • max-pool-size = 1, InUseCount = 1, waiting thread 2 -> MaxWaitCount = 1.
      • max-pool-size = 2, InUseCount = 2, waiting thread 1 -> MaxWaitCount = 0.
      • max-pool-size = 2, InUseCount = 2, waiting thread 2 -> MaxWaitCount = 1.

              mshikalw Moulali Shikalwadi
              rhn-support-hdaicho Hiroki Daicho (Inactive)
              Daniel Cihak Daniel Cihak
              Daniel Cihak Daniel Cihak
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

                Created:
                Updated:
                Resolved: