2

I have created a bounded-queue-thread-pool in Jboss 7.2.0 standalone.xml as follows:

<subsystem xmlns="urn:jboss:domain:threads:1.1">
    <bounded-queue-thread-pool name="myThreadPool">
    <core-threads count="6000"/>
    <queue-length count="1000"/>
    <max-threads count="6000"/>
    <keepalive-time time="60" unit="seconds"/>
    </bounded-queue-thread-pool>
</subsystem>

After that I am using this as executor in AJP connectors as follows:

<connector name="conn1" protocol="AJP/1.3" scheme="http" socket-binding="conn1" enabled="true" max-post-size="0" executor="myThreadPool" max-connections="2000"/>
<connector name="conn2" protocol="AJP/1.3" scheme="http" socket-binding="conn2" enabled="true" executor="myThreadPool" max-connections="2000"/>
<connector name="conn3" protocol="AJP/1.3" scheme="http" socket-binding="conn3" enabled="true" executor="myThreadPool" max-connections="2000"/>

At the end the socket binding for 3 connectors:

<socket-binding name="conn1" port="15007"/>
<socket-binding name="conn2" port="15008"/>
<socket-binding name="conn3" port="15009"/>

When I start jboss and create multiple http requests, each request thread is created as myThreadPool-threads-1, myThreadPool-threads-2 etc. However when I shutdown jboss using command line, these threads are not getting terminated. Here is the command I use to shutdown:

%JBOSS_HOME%\bin\jboss-cli.bat --connect controller=10.10.54.85:9999 --commands=:shutdown

Due to this, the java process of jboss-AS is not getting killed. However when I simply remove the executor from connector, the java process is terminated successfully. Can someone suggest me how to terminated all the threads of threadPool when server is shutdown?

keenUser
  • 1,279
  • 3
  • 16
  • 33

1 Answers1

1

Probably this bug is a cause of your problem, a workaround is set:

org.apache.coyote.ajp.DEFAULT_CONNECTION_TIMEOUT

Add the following to your system-properties in your host.xml, standalone.xml or domain.xml:

<system-properties>
    <property name="org.apache.coyote.ajp.DEFAULT_CONNECTION_TIMEOUT" value="600000"/>
<system-properties>

this works except if we continuously send request to the server.

See also: server hang during shutdown when specifying executor in connector

Federico Sierra
  • 5,118
  • 2
  • 23
  • 36