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 2011/04/18 17:38:08 UTC
svn commit: r1094621 - in /tomcat/trunk: java/org/apache/coyote/
java/org/apache/coyote/http11/ webapps/docs/ webapps/docs/config/
Author: markt
Date: Mon Apr 18 15:38:07 2011
New Revision: 1094621
URL: http://svn.apache.org/viewvc?rev=1094621&view=rev
Log:
Align connector implementations with documented default for processorCache
Modified:
tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java
tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java
tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java
tomcat/trunk/java/org/apache/coyote/http11/Http11Protocol.java
tomcat/trunk/webapps/docs/changelog.xml
tomcat/trunk/webapps/docs/config/ajp.xml
tomcat/trunk/webapps/docs/config/http.xml
Modified: tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java?rev=1094621&r1=1094620&r2=1094621&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java (original)
+++ tomcat/trunk/java/org/apache/coyote/AbstractProtocolHandler.java Mon Apr 18 15:38:07 2011
@@ -98,11 +98,12 @@ public abstract class AbstractProtocolHa
/**
* The maximum number of idle processors that will be retained in the cache
- * and re-used with a subsequent request. The default is -1, unlimited,
- * although in that case there will never be more Processor objects than
- * there are threads in the associated thread pool.
+ * and re-used with a subsequent request. The default is 200. A value of -1
+ * means unlimited. In the unlimited case, the theoretical maximum number of
+ * cached Processor objects is {@link #getMaxConnections()} although it will
+ * usually be closer to {@link #getMaxThreads()}.
*/
- protected int processorCache = -1;
+ protected int processorCache = 200;
public int getProcessorCache() { return this.processorCache; }
public void setProcessorCache(int processorCache) {
this.processorCache = processorCache;
Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java?rev=1094621&r1=1094620&r2=1094621&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java Mon Apr 18 15:38:07 2011
@@ -76,7 +76,6 @@ public class Http11AprProtocol extends A
setSoLinger(Constants.DEFAULT_CONNECTION_LINGER);
setSoTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT);
setTcpNoDelay(Constants.DEFAULT_TCP_NO_DELAY);
- setProcessorCache(-1);
}
private final Http11ConnectionHandler cHandler;
Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java?rev=1094621&r1=1094620&r2=1094621&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java Mon Apr 18 15:38:07 2011
@@ -74,7 +74,6 @@ public class Http11NioProtocol extends A
setSoLinger(Constants.DEFAULT_CONNECTION_LINGER);
setSoTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT);
setTcpNoDelay(Constants.DEFAULT_TCP_NO_DELAY);
- setProcessorCache(200);
}
Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11Protocol.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11Protocol.java?rev=1094621&r1=1094620&r2=1094621&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/Http11Protocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11Protocol.java Mon Apr 18 15:38:07 2011
@@ -74,7 +74,6 @@ public class Http11Protocol extends Abst
setSoLinger(Constants.DEFAULT_CONNECTION_LINGER);
setSoTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT);
setTcpNoDelay(Constants.DEFAULT_TCP_NO_DELAY);
- setProcessorCache(200);
}
Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1094621&r1=1094620&r2=1094621&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Mon Apr 18 15:38:07 2011
@@ -92,6 +92,13 @@
if it is configured for SSL and an invalid value is provided for
SSLProtocol. (markt)
</fix>
+ <fix>
+ Align all the connector implementations with the documented default
+ setting for processorCache of 200. This changes the default from -1
+ (unlimited) for the AJP-BIO, AJP-APR and HTTP-APR connectors. Additional
+ information was also added to the documentation on how to select an
+ appropriate value.
+ </fix>
</changelog>
</subsection>
<subsection name="Jasper">
Modified: tomcat/trunk/webapps/docs/config/ajp.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/ajp.xml?rev=1094621&r1=1094620&r2=1094621&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/config/ajp.xml (original)
+++ tomcat/trunk/webapps/docs/config/ajp.xml Mon Apr 18 15:38:07 2011
@@ -333,8 +333,11 @@
<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>
+ <code>-1</code> means unlimited, default is <code>200</code>. If not using
+ Servlet 3.0 asynchronous processing, a good default is to use the same as
+ the maxThreads setting. If using Servlet 3.0 asynchronous processing, a
+ good default is to use the larger of maxThreads and the maximum number of
+ expected concurrent requests (synchronous and asynchronous).</p>
</attribute>
<attribute name="requiredSecret" required="false">
Modified: tomcat/trunk/webapps/docs/config/http.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/http.xml?rev=1094621&r1=1094620&r2=1094621&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/config/http.xml (original)
+++ tomcat/trunk/webapps/docs/config/http.xml Mon Apr 18 15:38:07 2011
@@ -406,8 +406,11 @@
<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>
+ <code>-1</code> means unlimited, default is <code>200</code>. If not using
+ Servlet 3.0 asynchronous processing, a good default is to use the same as
+ the maxThreads setting. If using Servlet 3.0 asynchronous processing, a
+ good default is to use the larger of maxThreads and the maximum number of
+ expected concurrent requests (synchronous and asynchronous).</p>
</attribute>
<attribute name="restrictedUserAgents" required="false">
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org