What is the default value of maxThreads for HTTP/AJP Connector in JBoss EAP or Tomcat?

Solution Verified - Updated -

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 4.x
    • 5.x
    • 6.x
  • JBoss Application Server (AS) 4.0.x
  • RHEL 6 Tomcat 6.0

Issue

  • What value is used as default for "maxThreads" attribuite when it is not specified on JBossWeb's HTTP/AJP Connector in JBoss EAP?
  • Where the default value for http connector is specified in standalone file in EAP 6 ?
  • What value is used as default for "maxThreads" attribuite when it is not specified on JBossWeb's HTTP/AJP Connector in Tomcat 6.0 in RHEL 6?
  • What is default value of min/max thread in JBoss EAP 6? And where is this located? What is the default Min Thread value and is it possible to set one?

Resolution

AS 4.0.x:

  • If maxThreads attribute is not specified on JBossWeb's HTTP/AJP Connector in $JBOSS_HOME/server/$PROFILE/deploy/jbossweb-tomcat55.sar/server.xml, it defaults to 200.

EAP 4.x:

  • If maxThreads attribute is not specified on JBossWeb's HTTP/AJP Connector in $JBOSS_HOME/server/$PROFILE/deploy/jboss-web.deployer/server.xml, it defaults to 40.

EAP 5.x:

  • If maxThreads attribute is not specified on JBossWeb's HTTP/AJP Connector in $JBOSS_HOME/server/$PROFILE/deploy/jbossweb.sar/server.xml, the following value is used:
    • EAP 5.0.0 - 5.1.0: 200 for both default Java connector and native APR connector addon
    • EAP 5.1.1 onwards: Default is computed as:
      • 512 * Runtime.getRuntime().availableProcessors() for default Java connector
      • 32 * Runtime.getRuntime().availableProcessors() for native APR connector addon

EAP 6.x:

  • If the max-connections attributes is not set on web subsystem connectors in standalone-(*).xml / domain.xml, default is computed as:
    • 512 * Runtime.getRuntime().availableProcessors() for default Java connector
    • 32 * Runtime.getRuntime().availableProcessors() for native APR connector addon

Tomcat 6.0 in RHEL 6:

  • If maxThreads attribute is not specified on Tomcat HTTP/AJP <Connector> in /etc/tomcat6/server.xml, it defaults to 200.

Diagnostic Steps

You can check the current value of maxThreads via JMX-Console. And you can check the default value from the source code. For example:

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments