Thread pools used by Tomcat are configured on a per connector basis. The changes in this section are applied to the <JBdir>/server/configdir/deploy/jbossweb.deployer/server.xml file.

The default configuration is shown in this sample:

<!-- A HTTP/1.1 Connector on port 8080 -->
      <Connector port="8080" address="${jboss.bind.address}"
         maxThreads="250" strategy="ms" maxHttpHeaderSize="8192"
         emptySessionPath="true"
         enableLookups="false" redirectPort="8443" acceptCount="100"
         connectionTimeout="20000" disableUploadTimeout="true"/>

      <!-- Add this option to the connector to avoid problems with
          .NET clients that don't implement HTTP/1.1 correctly
         restrictedUserAgents="^.*MS Web Services Client Protocol 1.1.4322.*$"
      -->

      <!-- A AJP 1.3 Connector on port 8009 -->
      <Connector port="8009" address="${jboss.bind.address}"
         emptySessionPath="true" enableLookups="false" redirectPort="8443"
         protocol="AJP/1.3"/>

Thread pools can be monitored using the Tomcat monitor at http://hostname:http_port. The Tomcat status link is under the JBoss Management heading, for example:

Tomcat status (full) (XML)
Reducing the HTTP Connector Thread Pool

This connector is only used when you connect to Tomcat directly from your web browser. In this example, the thread pool for the HTTP connector was reduced from 250 to 20.

<!-- A HTTP/1.1 Connector on port 8080 -->
      <Connector port="8080" address="${jboss.bind.address}"
         maxThreads="20" strategy="lf" maxHttpHeaderSize="8192"

The maxThreads setting should reflect the expected maximum number of users that can simultaneously use the system. This number should also drive the maximum number of database connections in the data source *-ds.xml file.

Full documentation for the HTTP Connector configuration can be found at http://tomcat.apache.org.

Increasing the AJP Connector Thread Pool

This is the primary means of contacting the server for a user (via Apache and mod_jk). In this example, the thread pool for the AJP connector is increased:

<!-- A AJP 1.3 Connector on port 8009 -->
      <Connector port="8009" address="${jboss.bind.address}"
          maxThreads="250" strategy="lf" minSpareThreads="50"
         emptySessionPath="true" enableLookups="false" redirectPort="8443"
         bufferSize="10240" maxHttpHeaderSize="8192" tcpNoDelay="true"
         protocol="AJP/1.3"/>

Full documentation for the AJP Connector and a complete dictionary of the AJP connector configuration can be found at http://tomcat.apache.org.


Copyright © 1997, 2014 Oracle and/or its affiliates. All rights reserved. Legal Notices