6 Replies Latest reply on Jan 11, 2016 11:29 PM by Raja Sekhar

    Thread property set in domain.xml

    Raja Sekhar Newbie

      Hi All,


           I am new to the Jboss environment. Kindly suggest me to understand Jboss and use wihtout having any problem.


      How to set the thread value domain/standard.xml files?

      How to increase timeout value in jboss as well as how to set the AJP connections value?


      Thank and Regards


        • 1. Re: Thread property set in domain.xml
          Jay SenSharma Master

          In order to tune the threads you will need to configure the "executors" as described in the following link:

          Example: Following is an example of HTTP executor, Exactly same approach you can use for the AJP executors.



          <subsystem xmlns="urn:jboss:domain:web:1.0">

          <connector enable-lookups="false" enabled="true"     



                      max-post-size="2048" max-save-post-size="4096"

                      name="http" protocol="HTTP/1.1"

                      proxy-name="proxy" proxy-port="8081"

                      redirect-port="8443" scheme="http"

                      secure="false" socket-binding="http" />

                      . . .



          <subsystem xmlns="urn:jboss:domain:threads:1.0">

              <bounded-queue-thread-pool name="http-executor"


                  <core-threads count="10" per-cpu="20" />

                  <queue-length count="10" per-cpu="20" />

                  <max-threads count="10" per-cpu="20" />

                  <keepalive-time time="10" unit="seconds" />





             Regarding the "timeout" can you please let us know which timeout actually you want to set?  If you are talking about the "keepalive-time" then above is the approach mentioned for the same.


          19.2. Connector Configuration





          Jay SenSharma

          • 2. Re: Thread property set in domain.xml
            Raja Sekhar Newbie

            Hi Jay,


              Thanks for your configuration


              I removed bounded-queue-thread-pool from the domain.xml and using AJP configuration like below.Please suggest me how to find out howmany threads i am using for the application now here.


            <subsystem xmlns="urn:jboss:domain:web:1.5" default-virtual-server="default-host" native="false">

                            <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http" executor="http-executor"/>

                            <connector name="ajp" protocol="AJP/1.3" scheme="http" socket-binding="ajp" max-connections="5000"/>

                            <virtual-server name="default-host" enable-welcome-root="true">

                                <alias name="localhost"/>

                                <alias name="example.com"/>




            Thanks in Advance.




            • 3. Re: Thread property set in domain.xml
              Raja Sekhar Newbie

              Hello All,


                     Can someone please look on my request. I will be thankful to anyone who gives the information corresponding to this.


              Thanks in Advance.




              • 4. Re: Thread property set in domain.xml
                Jay SenSharma Master

                Hello Rajasekhar,

                    "max-connections" are used to set the max thread pool size of the default java connectors when an executor is not enabled.

                    If the executor is not enabled on the connector the the System Property "org.apache.tomcat.util.net.MAX_THREADS" can be used to control the max threads creation. But we should remember that the "max-connections" set at the connector always takes precedence of this system property.


                    Now as for as monitoring of threads are concerned:

                    >>>> The EAP6 "web" subsystem uses an internal thread pool (by default). Which allows you can define "max-connections" parameter on the connector, which sets the connector's internal thread pool size.  However there is no option available to monitor the  "default internal thread pool".  So if you really want to monitor then you should create a "executor" as mentioned earlier.  Like following:


                #STANDALONE MODE
                #DOMAIN MODE




                ... (Additional Info for other threads monitoring):

                However you can monitor the "jca based workmanager" threads using MBean client tools like JVisualVM or JConsole ...etc  by navigating to the MBean "jboss.as:jca  (default)"

                You can also use the "jboss-cli.sh" command as following for the same purpose.



                [standalone@localhost:9999 /] /subsystem=jca/workmanager=default/long-running-threads=default:read-resource(include-runtime=true)
                    "outcome" => "success",
                    "result" => {
                        "allow-core-timeout" => false,
                        "core-threads" => 50,
                        "current-thread-count" => 0,
                        "handoff-executor" => undefined,
                        "keepalive-time" => {
                            "time" => 10L,
                            "unit" => "SECONDS"
                        "largest-thread-count" => 0,
                        "max-threads" => 50,
                        "name" => "default",
                        "queue-length" => 50,
                        "queue-size" => 0,
                        "rejected-count" => 0,
                        "thread-factory" => undefined


                In domain mode you can use the following command:





                Jay SenSharma

                • 5. Re: Thread property set in domain.xml
                  Raja Sekhar Newbie

                  Hi Jay,


                  Its useful.


                  Clarify me. I am executing below command to find out the threads usage in my server. I googled it and found the below command. This command will result of Active threads in the server.


                  netstat -olpw | grep <pid>


                  Here i am seeing less than 700 Active threads and near to 400 BLOCKED,WAITING,SLEEPING threads in separately. But my ajp max-connections are 5000, it means i hope its not utilizing that many connections ? but i am facing the issue.


                  My confusion here, I removed Bounded queue so there is no thread configuration and i added ajp connections which i mentioned before. Then how the threads are utilizing and how many default threads are there in the server.




                  • 6. Re: Thread property set in domain.xml
                    Raja Sekhar Newbie

                    Hello All,


                       Anyone can clarify on this?