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 2012/05/10 23:11:25 UTC
svn commit: r1336889 - in /tomcat/tc7.0.x/trunk: ./
java/org/apache/tomcat/util/net/AbstractEndpoint.java
java/org/apache/tomcat/util/net/JIoEndpoint.java webapps/docs/changelog.xml
webapps/docs/config/ajp.xml webapps/docs/config/http.xml
Author: markt
Date: Thu May 10 21:11:24 2012
New Revision: 1336889
URL: http://svn.apache.org/viewvc?rev=1336889&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53063
When using an Executor with BIO, use the executor's maxThreads as the default for maxConnections
Modified:
tomcat/tc7.0.x/trunk/ (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
tomcat/tc7.0.x/trunk/webapps/docs/config/ajp.xml
tomcat/tc7.0.x/trunk/webapps/docs/config/http.xml
Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
Merged /tomcat/trunk:r1336884
Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java?rev=1336889&r1=1336888&r2=1336889&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/AbstractEndpoint.java Thu May 10 21:11:24 2012
@@ -305,7 +305,10 @@ public abstract class AbstractEndpoint {
}
}
public int getMaxThreads() {
- if (running && executor!=null) {
+ return getMaxThreadsExecutor(running);
+ }
+ protected int getMaxThreadsExecutor(boolean useExecutor) {
+ if (useExecutor && executor != null) {
if (executor instanceof java.util.concurrent.ThreadPoolExecutor) {
return ((java.util.concurrent.ThreadPoolExecutor)executor).getMaximumPoolSize();
} else if (executor instanceof ResizableExecutor) {
Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java?rev=1336889&r1=1336888&r2=1336889&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java Thu May 10 21:11:24 2012
@@ -375,7 +375,7 @@ public class JIoEndpoint extends Abstrac
// Initialize maxConnections
if (getMaxConnections() == 0) {
// User hasn't set a value - use the default
- setMaxConnections(getMaxThreads());
+ setMaxConnections(getMaxThreadsExecutor(true));
}
if (serverSocketFactory == null) {
Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1336889&r1=1336888&r2=1336889&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Thu May 10 21:11:24 2012
@@ -123,6 +123,10 @@
(markt)
</fix>
<fix>
+ <bug>53063</bug>: When using an Executor with BIO, use the
+ executor's maxThreads as the default for maxConnections. (markt)
+ </fix>
+ <fix>
<bug>53173</bug> (<rev>1333116</rev>) :
Properly count down maxConnections (fhanik)
</fix>
Modified: tomcat/tc7.0.x/trunk/webapps/docs/config/ajp.xml
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/config/ajp.xml?rev=1336889&r1=1336888&r2=1336889&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/config/ajp.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/config/ajp.xml Thu May 10 21:11:24 2012
@@ -345,7 +345,9 @@
falls below this value. The operating system may still accept
connections based on the <code>acceptCount</code> setting. Default value
varies by connector type. For BIO the default is the value of
- <strong>maxThreads</strong>. For NIO the default is <code>10000</code>.
+ <strong>maxThreads</strong> unless an <a href="executir.html">Executor</a>
+ is used in which case the default will be the value of maxThreads from the
+ executor. For NIO the default is <code>10000</code>.
For APR/native, the default is <code>8192</code>.</p>
<p>Note that for APR/native on Windows, the configured value will be
reduced to the highest multiple of 1024 that is less than or equal to
Modified: tomcat/tc7.0.x/trunk/webapps/docs/config/http.xml
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/config/http.xml?rev=1336889&r1=1336888&r2=1336889&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/config/http.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/config/http.xml Thu May 10 21:11:24 2012
@@ -380,7 +380,9 @@
falls below this value. The operating system may still accept
connections based on the <code>acceptCount</code> setting. Default value
varies by connector type. For BIO the default is the value of
- <strong>maxThreads</strong>. For NIO the default is <code>10000</code>.
+ <strong>maxThreads</strong> unless an <a href="executir.html">Executor</a>
+ is used in which case the default will be the value of maxThreads from the
+ executor. For NIO the default is <code>10000</code>.
For APR/native, the default is <code>8192</code>.</p>
<p>Note that for APR/native on Windows, the configured value will be
reduced to the highest multiple of 1024 that is less than or equal to
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org