0 Replies Latest reply on Dec 1, 2015 11:20 AM by jim_b_o

    jca workmanager max-threads does not seem to work

    jim_b_o

      When configuring the jca workmanager long-running-threads I'm setting "core-threads" => 60 and "max-threads" => 120 but the pool never grows above 60.  Per the output below we can see that there are 60 threads in use and 2 more jobs queued that never get started.

       

      /subsystem=jca/workmanager=default/long-running-threads=default:read-resource(recursive=true,include-runtime=true)

      {

          "outcome" => "success",

          "result" => {

              "allow-core-timeout" => false,

              "core-threads" => 60,

              "current-thread-count" => 60,

              "handoff-executor" => undefined,

              "keepalive-time" => {

                  "time" => 10L,

                  "unit" => "SECONDS"

              },

              "largest-thread-count" => 60,

              "max-threads" => 120,

              "name" => "default",

              "queue-length" => 50,

              "queue-size" => 2,

              "rejected-count" => 0,

              "thread-factory" => undefined

          }

      }

       

      /subsystem=jca/workmanager=default/statistics=local:read-resource(recursive=true,include-runtime=true)

      {

          "outcome" => "success",

          "result" => {

              "dowork-accepted" => 0,

              "dowork-rejected" => 0,

              "schedulework-accepted" => 0,

              "schedulework-rejected" => 0,

              "startwork-accepted" => 62,

              "startwork-rejected" => 0,

              "statistics-enabled" => true,

              "work-active" => 60,

              "work-failed" => 0,

              "work-successful" => 60,

              "workmanager-statistics-enabled" => true

          }

      }

       

      If I set "core-threads" => 120 then everything is OK as shown below.

       

      /subsystem=jca/workmanager=default/long-running-threads=default:read-resource(recursive=true,include-runtime=true)

      {

          "outcome" => "success",

          "result" => {

              "allow-core-timeout" => false,

              "core-threads" => 120,

              "current-thread-count" => 87,

              "handoff-executor" => undefined,

              "keepalive-time" => {

                  "time" => 10L,

                  "unit" => "SECONDS"

              },

              "largest-thread-count" => 87,

              "max-threads" => 120,

              "name" => "default",

              "queue-length" => 50,

              "queue-size" => 0,

              "rejected-count" => 0,

              "thread-factory" => undefined

          }

      }

       

      /subsystem=jca/workmanager=default/statistics=local:read-resource(recursive=true,include-runtime=true)

      {

          "outcome" => "success",

          "result" => {

              "dowork-accepted" => 0,

              "dowork-rejected" => 0,

              "schedulework-accepted" => 0,

              "schedulework-rejected" => 0,

              "startwork-accepted" => 87,

              "startwork-rejected" => 0,

              "statistics-enabled" => true,

              "work-active" => 87,

              "work-failed" => 0,

              "work-successful" => 87,

              "workmanager-statistics-enabled" => true

          }

      }

       

      So it looks like max-threads is being ignored.  Perhaps this is similar to https://issues.jboss.org/browse/WFLY-5332?

      This is occurring with WildFly 10.0.0.CR4 and 10.0.0.CR5-SNAPSHOT from about a week ago.

       

      So the workaround is easy but it looks like there may be a bug.  Can anyone confirm having similar problems?