You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2010/02/01 16:23:30 UTC
svn commit: r905305 - in /tomcat/trunk/webapps/docs: apr.xml config/ajp.xml
Author: markt
Date: Mon Feb 1 15:23:30 2010
New Revision: 905305
URL: http://svn.apache.org/viewvc?rev=905305&view=rev
Log:
Sync docs and APR/native connector config
Modified:
tomcat/trunk/webapps/docs/apr.xml
tomcat/trunk/webapps/docs/config/ajp.xml
Modified: tomcat/trunk/webapps/docs/apr.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/apr.xml?rev=905305&r1=905304&r2=905305&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/apr.xml (original)
+++ tomcat/trunk/webapps/docs/apr.xml Mon Feb 1 15:23:30 2010
@@ -169,35 +169,9 @@
</subsection>
<subsection name="AJP">
-
- <p>
- 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.
- </p>
-
- <p>
- The following attributes are supported in the AJP APR connector in addition to the ones supported
- in the regular AJP connector:
- </p>
-
- <attributes>
-
- <attribute name="pollTime" required="false">
- <p>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).</p>
- </attribute>
-
- <attribute name="pollerSize" required="false">
- <p>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.</p>
- </attribute>
- </attributes>
+ <p>For AJP configuration, see the <a href="config/ajp.html">AJP</a>
+ connector configuration documentation.</p>
</subsection>
Modified: tomcat/trunk/webapps/docs/config/ajp.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/ajp.xml?rev=905305&r1=905304&r2=905305&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/config/ajp.xml (original)
+++ tomcat/trunk/webapps/docs/config/ajp.xml Mon Feb 1 15:23:30 2010
@@ -224,8 +224,27 @@
<p>They support the following additional attributes (in addition to the
common attributes listed above):</p>
+ <p>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:</p>
+
<attributes>
+ <attribute name="acceptCount" required="false">
+ <p>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.</p>
+ </attribute>
+
+ <attribute name="acceptorThreadCount" required="false">
+ <p>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 <code>2</code>. Also, with a lot of non keep alive connections, you
+ might want to increase this value as well. Default value is
+ <code>1</code>.</p>
+ </attribute>
+
<attribute name="address" required="false">
<p>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.</p>
</attribute>
- <attribute name="backlog" required="false">
- <p>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.</p>
- </attribute>
-
- <attribute name="bufferSize" required="false">
- <p>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)</p>
+ <attribute name="connectionLinger" required="false">
+ <p>The number of milliseconds during which the sockets used by this
+ <strong>Connector</strong> will linger when they are closed.
+ The default value <code>-1</code> which disables this option.</p>
</attribute>
<attribute name="connectionTimeout" required="false">
<p>The number of milliseconds this <strong>Connector</strong> will wait,
after accepting a connection, for the request URI line to be
- presented. The default value is infinite (i.e. no timeout).</p>
+ presented. The default value is 60000 (i.e. 60 seconds).</p>
</attribute>
<attribute name="executor" required="false">
- <p>A reference to the name in an <a href="executor.html">Executor</a> 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.</p>
+ <p>A reference to the name in an <a href="executor.html">Executor</a>
+ 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.</p>
</attribute>
<attribute name="keepAliveTimeout" required="false">
@@ -276,6 +291,11 @@
execute tasks using the executor rather than an internal thread pool.</p>
</attribute>
+ <attribute name="minSpareThreads" required="false">
+ <p>The minimum number of threads always kept running. If not specified,
+ the default of <code>10</code> is used.</p>
+ </attribute>
+
<attribute name="packetSize" required="false">
<p>This attribute sets the maximum AJP packet size in Bytes. The maximum
value is 65536. It should be the same as the <code>max_packet_size</code>
@@ -285,31 +305,32 @@
value is 8192.</p>
</attribute>
- <attribute name="request.secret" required="false">
+ <attribute name="processorCache" required="false">
+ <p>The protocol handler caches Processor objects to speed up performance.
+ This setting dictates how many of these objects get cached.
+ <code>-1</code> means unlimited, default is <code>200</code>. Set this
+ value somewhere close to your maxThreads value.</p>
+ </attribute>
+
+ <attribute name="requiredSecret" required="false">
<p>Only requests from workers with this secret keyword will be accepted.
</p>
</attribute>
- <attribute name="request.shutdownEnabled" required="false">
- <p>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 <code>false</code> by
- default.</p>
- </attribute>
-
- <attribute name="request.useSecret" required="false">
- <p>If set to <code>true</code>, then a random value for
- <code>request.secret</code> will be generated. It is for use with
- <code>request.shutdownEnabled</code>. This is set to <code>false</code>
- by default.</p>
- </attribute>
-
<attribute name="tcpNoDelay" required="false">
<p>If set to <code>true</code>, the TCP_NO_DELAY option will be
set on the server socket, which improves performance under most
circumstances. This is set to <code>true</code> by default.</p>
</attribute>
+ <attribute name="threadPriority" required="false">
+ <p>The priority of the request processing threads within the JVM.
+ The default value is <code>java.lang.Thread#NORM_PRIORITY</code>.
+ See the JavaDoc for the java.lang.Thread class for more details on
+ what this priority means.
+ </p>
+ </attribute>
+
<attribute name="tomcatAuthentication" required="false">
<p>If set to <code>true</code>, the authentication will be done in Tomcat.
Otherwise, the authenticated principal will be propagated from the native
@@ -321,6 +342,113 @@
</subsection>
+ <subsection name="BIO specific configuration">
+
+ <p>The BIO implementation supports the following Java TCP socket attributes
+ in addition to the common Connector and AJP attributes listed above.</p>
+
+ <attributes>
+ <attribute name="socket.rxBufSize" required="false">
+ <p>(int)The socket receive buffer (SO_RCVBUF) size in bytes. JVM default
+ used if not set.</p>
+ </attribute>
+ <attribute name="socket.txBufSize" required="false">
+ <p>(int)The socket send buffer (SO_SNDBUF) size in bytes. JVM default
+ used if not set.</p>
+ </attribute>
+ <attribute name="socket.tcpNoDelay" required="false">
+ <p>(bool)This is equivalent to standard attribute
+ <strong>tcpNoDelay</strong>.</p>
+ </attribute>
+ <attribute name="socket.soKeepAlive" required="false">
+ <p>(bool)Boolean value for the socket's keep alive setting
+ (SO_KEEPALIVE). JVM default used if not set.</p>
+ </attribute>
+ <attribute name="socket.ooBInline" required="false">
+ <p>(bool)Boolean value for the socket OOBINLINE setting. JVM default
+ used if not set.</p>
+ </attribute>
+ <attribute name="socket.soReuseAddress" required="false">
+ <p>(bool)Boolean value for the sockets reuse address option
+ (SO_REUSEADDR). JVM default used if not set.</p>
+ </attribute>
+ <attribute name="socket.soLingerOn" required="false">
+ <p>(bool)Boolean value for the sockets so linger option (SO_LINGER).
+ A value for the standard attribute <strong>connectionLinger</strong>
+ that is >=0 is equivalent to setting this to <code>true</code>.
+ A value for the standard attribute <strong>connectionLinger</strong>
+ that is <0 is equivalent to setting this to <code>false</code>.
+ Both this attribute and <code>soLingerTime</code> must be set else the
+ JVM defaults will be used for both.</p>
+ </attribute>
+ <attribute name="socket.soLingerTime" required="false">
+ <p>(int)Value in seconds for the sockets so linger option (SO_LINGER).
+ This is equivalent to standard attribute
+ <strong>connectionLinger</strong>.
+ Both this attribute and <code>soLingerOn</code> must be set else the
+ JVM defaults will be used for both.</p>
+ </attribute>
+ <attribute name="socket.soTimeout" required="false">
+ <p>This is equivalent to standard attribute
+ <strong>connectionTimeout</strong>.</p>
+ </attribute>
+ <attribute name="socket.soTrafficClass" required="false">
+ <p>(byte)Value between <code>0</code> and <code>255</code> for the
+ traffic class on the socket. JVM default used if not set.</p>
+ <p><strong>Note</strong>On some JDK versions, setting
+ <strong>soTrafficClass</strong> causes a problem. A work around for this
+ is to add the <code>-Djava.net.preferIPv4Stack=true</code> value to your
+ JVM options.</p>
+ </attribute>
+ <attribute name="socket.performanceConnectionTime" required="false">
+ <p>(int)The first value for the performance settings. See
+ <a href="http://java.sun.com/j2se/1.6.0/docs/api/java/net/Socket.html#setPerformancePreferences(int,%20int,%20int)">Socket Performance Options</a>
+ All three performance attributes must be set else the JVM defaults will
+ be used for all three.</p>
+ </attribute>
+ <attribute name="socket.performanceLatency" required="false">
+ <p>(int)The second value for the performance settings. See
+ <a href="http://java.sun.com/j2se/1.6.0/docs/api/java/net/Socket.html#setPerformancePreferences(int,%20int,%20int)">Socket Performance Options</a>
+ All three performance attributes must be set else the JVM defaults will
+ be used for all three.</p>
+ </attribute>
+ <attribute name="socket.performanceBandwidth" required="false">
+ <p>(int)The third value for the performance settings. See
+ <a href="http://java.sun.com/j2se/1.6.0/docs/api/java/net/Socket.html#setPerformancePreferences(int,%20int,%20int)">Socket Performance Options</a>
+ All three performance attributes must be set else the JVM defaults will
+ be used for all three.</p>
+ </attribute>
+ <attribute name="socket.unlockTimeout" required="false">
+ <p>(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 <code>250</code> and the value is in milliseconds</p>
+ </attribute>
+ </attributes>
+ </subsection>
+
+ <subsection name="APR/native specific configuration">
+
+ <p>The APR/native implementation supports the following attributes in
+ addition to the common Connector and AJP attributes listed above.</p>
+
+ <attributes>
+ <attribute name="pollTime" required="false">
+ <p>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).
+ </p>
+ </attribute>
+
+ <attribute name="pollerSize" required="false">
+ <p>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.</p>
+ </attribute>
+
+ </attributes>
+
+ </subsection>
+
</section>
@@ -330,6 +458,26 @@
</section>
+<section name="Special Features">
+
+ <subsection name="Proxy Support">
+
+ <p>The <code>proxyName</code> and <code>proxyPort</code> attributes can
+ be used when Tomcat is run behind a proxy server. These attributes
+ modify the values returned to web applications that call the
+ <code>request.getServerName()</code> and <code>request.getServerPort()</code>
+ 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.</p>
+
+ <p>For more information, see the
+ <a href="../proxy-howto.html">Proxy Support HOW-TO</a>.</p>
+
+ </subsection>
+
+</section>
</body>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org