From: markt
- When APR is enabled, the AJP connector will use a socket poller for keepalive, increasing
- scalability of the server. As AJP is designed around a pool of persistent (or almost
- persistent) connections, this will reduce significantly the amount of processing threads
- needed by Tomcat. Unlike the HTTP connector, the AJP connector cannot use sendfile to optimize
- static file processing.
-
- The following attributes are supported in the AJP APR connector in addition to the ones supported
- in the regular AJP connector:
- Duration of a poll call. Lowering this value will slightly decrease latency of connections
- being kept alive in some cases, but will use more CPU as more poll calls are being made. The
- default value is 2000 (5ms). Amount of sockets that the poller responsible for polling kept alive connections can hold at a
- given time. Extra connections will be closed right away. The default value is 8192, corresponding to
- 8192 keepalive connections. For AJP configuration, see the AJP
+ connector configuration documentation. They support the following additional attributes (in addition to the
common attributes listed above): The BIO and APR/native implementations (there is no NIO implementation for
+ APR) both support the following additional attributes in addition to the
+ standard Connector attributes listed above: The maximum queue length for incoming connection requests when
+ all possible request processing threads are in use. Any requests
+ received when the queue is full will be refused. The default
+ value is 100. The number of threads to be used to accept connections. Increase this
+ value on a multi CPU machine, although you would never really need more
+ than For servers with more than one IP address, this attribute
specifies which address will be used for listening on the specified
@@ -235,29 +254,25 @@
interface. The maximum queue length for incoming connection requests when
- all possible request processing threads are in use. Any requests
- received when the queue is full will be refused. The default
- value is 100. The size of the output buffer to use. If less than or equal to zero,
- then output buffering is disabled. The default value is -1
- (i.e. buffering disabled) The number of milliseconds during which the sockets used by this
+ Connector will linger when they are closed.
+ The default value The number of milliseconds this Connector will wait,
after accepting a connection, for the request URI line to be
- presented. The default value is infinite (i.e. no timeout).2. Also, with a lot of non keep alive connections, you
+ might want to increase this value as well. Default value is
+ 1.-1 which disables this option.
A reference to the name in an Executor element. - If this attribute is enabled, and the named executor exists, the connector will - use the executor, and all the other thread attributes will be ignored.
+A reference to the name in an Executor + element. If this attribute is set, and the named executor exists, the + connector will use the executor, and all the other thread attributes will + be ignored. Note that if a shared executor is not specified for a + connector then the connector will use a private, internal executor to + provide the thread pool.
The minimum number of threads always kept running. If not specified,
+ the default of 10 is used.
This attribute sets the maximum AJP packet size in Bytes. The maximum
value is 65536. It should be the same as the max_packet_size
@@ -285,31 +305,32 @@
value is 8192.
The protocol handler caches Processor objects to speed up performance.
+ This setting dictates how many of these objects get cached.
+ -1 means unlimited, default is 200. Set this
+ value somewhere close to your maxThreads value.
Only requests from workers with this secret keyword will be accepted.
If true and a secret has been configured, a correctly formatted AJP
- request (that includes the secret) will shutdown the Tomcat instance
- associated with this connector. This is set to false by
- default.
If set to true, then a random value for
- request.secret will be generated. It is for use with
- request.shutdownEnabled. This is set to false
- by default.
If set to true, the TCP_NO_DELAY option will be
set on the server socket, which improves performance under most
circumstances. This is set to true by default.
The priority of the request processing threads within the JVM.
+ The default value is java.lang.Thread#NORM_PRIORITY.
+ See the JavaDoc for the java.lang.Thread class for more details on
+ what this priority means.
+
If set to The BIO implementation supports the following Java TCP socket attributes
+ in addition to the common Connector and AJP attributes listed above. (int)The socket receive buffer (SO_RCVBUF) size in bytes. JVM default
+ used if not set. (int)The socket send buffer (SO_SNDBUF) size in bytes. JVM default
+ used if not set. (bool)This is equivalent to standard attribute
+ tcpNoDelay. (bool)Boolean value for the socket's keep alive setting
+ (SO_KEEPALIVE). JVM default used if not set. (bool)Boolean value for the socket OOBINLINE setting. JVM default
+ used if not set. (bool)Boolean value for the sockets reuse address option
+ (SO_REUSEADDR). JVM default used if not set. (bool)Boolean value for the sockets so linger option (SO_LINGER).
+ A value for the standard attribute connectionLinger
+ that is >=0 is equivalent to setting this to (int)Value in seconds for the sockets so linger option (SO_LINGER).
+ This is equivalent to standard attribute
+ connectionLinger.
+ Both this attribute and This is equivalent to standard attribute
+ connectionTimeout. (byte)Value between NoteOn some JDK versions, setting
+ soTrafficClass causes a problem. A work around for this
+ is to add the (int)The first value for the performance settings. See
+ Socket Performance Options
+ All three performance attributes must be set else the JVM defaults will
+ be used for all three. (int)The second value for the performance settings. See
+ Socket Performance Options
+ All three performance attributes must be set else the JVM defaults will
+ be used for all three. (int)The third value for the performance settings. See
+ Socket Performance Options
+ All three performance attributes must be set else the JVM defaults will
+ be used for all three. (int) The timeout for a socket unlock. When a connector is stopped, it will try to release the acceptor thread by opening a connector to itself.
+ The default value is The APR/native implementation supports the following attributes in
+ addition to the common Connector and AJP attributes listed above. Duration of a poll call. Lowering this value will slightly decrease
+ latency of connections being kept alive in some cases, but will use more
+ CPU as more poll calls are being made. The default value is 2000 (2ms).
+ Amount of sockets that the poller responsible for polling kept alive
+ connections can hold at a given time. Extra connections will be closed
+ right away. The default value is 8192, corresponding to 8192 keep-alive
+ connections. The For more information, see the
+ Proxy Support HOW-TO.true, the authentication will be done in Tomcat.
Otherwise, the authenticated principal will be propagated from the native
@@ -321,6 +342,113 @@
+ true.
+ A value for the standard attribute connectionLinger
+ that is <0 is equivalent to setting this to false.
+ Both this attribute and soLingerTime must be set else the
+ JVM defaults will be used for both.soLingerOn must be set else the
+ JVM defaults will be used for both.0 and 255 for the
+ traffic class on the socket. JVM default used if not set.-Djava.net.preferIPv4Stack=true value to your
+ JVM options.250 and the value is in millisecondsproxyName and proxyPort attributes can
+ be used when Tomcat is run behind a proxy server. These attributes
+ modify the values returned to web applications that call the
+ request.getServerName() and request.getServerPort()
+ methods, which are often used to construct absolute URLs for redirects.
+ Without configuring these attributes, the values returned would reflect
+ the server name and port on which the connection from the proxy server
+ was received, rather than the server name and port to whom the client
+ directed the original request.