This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/master by this push: new 34a4b06 Default maxConnections to 8192 for all connectors 34a4b06 is described below commit 34a4b06dc0274bb9f72f02ae025239fa63570c27 Author: remm <r...@apache.org> AuthorDate: Thu Nov 21 09:25:54 2019 +0100 Default maxConnections to 8192 for all connectors NIOx were using 10k as the maxConnections default, and APR was using 8192. Harmonize all connectors down to 8192 since it's almost the same and is easier to explain in the docs. --- java/org/apache/tomcat/util/net/AbstractEndpoint.java | 5 ++--- java/org/apache/tomcat/util/net/AprEndpoint.java | 3 --- webapps/docs/changelog.xml | 4 ++++ webapps/docs/config/ajp.xml | 5 ++--- webapps/docs/config/http.xml | 5 ++--- 5 files changed, 10 insertions(+), 12 deletions(-) diff --git a/java/org/apache/tomcat/util/net/AbstractEndpoint.java b/java/org/apache/tomcat/util/net/AbstractEndpoint.java index 12b8a25..db9fa70 100644 --- a/java/org/apache/tomcat/util/net/AbstractEndpoint.java +++ b/java/org/apache/tomcat/util/net/AbstractEndpoint.java @@ -455,7 +455,7 @@ public abstract class AbstractEndpoint<S,U> { public int getAcceptorThreadPriority() { return acceptorThreadPriority; } - private int maxConnections = 10000; + private int maxConnections = 8*1024; public void setMaxConnections(int maxCon) { this.maxConnections = maxCon; LimitLatch latch = this.connectionLimitLatch; @@ -470,8 +470,7 @@ public abstract class AbstractEndpoint<S,U> { initializeConnectionLatch(); } } - - public int getMaxConnections() { return this.maxConnections; } + public int getMaxConnections() { return this.maxConnections; } /** * Return the current count of connections handled by this endpoint, if the diff --git a/java/org/apache/tomcat/util/net/AprEndpoint.java b/java/org/apache/tomcat/util/net/AprEndpoint.java index 31b811b..f34ccf3 100644 --- a/java/org/apache/tomcat/util/net/AprEndpoint.java +++ b/java/org/apache/tomcat/util/net/AprEndpoint.java @@ -111,9 +111,6 @@ public class AprEndpoint extends AbstractEndpoint<Long,Long> implements SNICallB // ------------------------------------------------------------ Constructor public AprEndpoint() { - // Need to override the default for maxConnections to align it with what - // was pollerSize (before the two were merged) - setMaxConnections(8 * 1024); // Asynchronous IO has significantly lower performance with APR: // - no IO vectoring // - mandatory use of direct buffers forces output buffering diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 08ec5a0..7b66046 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -51,6 +51,10 @@ Fix endpoint closeSocket and destroySocket discrepancies, in particular in the APR connector. (remm) </fix> + <fix> + Harmonize maxConnections default value to 8192 across all connectors. + (remm) + </fix> </changelog> </subsection> <subsection name="Web applications"> diff --git a/webapps/docs/config/ajp.xml b/webapps/docs/config/ajp.xml index 137c6e7..c70af91 100644 --- a/webapps/docs/config/ajp.xml +++ b/webapps/docs/config/ajp.xml @@ -376,9 +376,8 @@ falls below <strong>maxConnections</strong> at which point the server will start accepting and processing new connections again. Note that once the limit has been reached, the operating system may still accept connections - based on the <code>acceptCount</code> setting. The default value varies by - connector type. For NIO and NIO2 the default is <code>10000</code>. - For APR/native, the default is <code>8192</code>.</p> + based on the <code>acceptCount</code> setting. The default value + is <code>8192</code>.</p> <p>For NIO/NIO2 only, setting the value to -1, will disable the maxConnections feature and connections will not be counted.</p> </attribute> diff --git a/webapps/docs/config/http.xml b/webapps/docs/config/http.xml index 0747de7..0f95e65 100644 --- a/webapps/docs/config/http.xml +++ b/webapps/docs/config/http.xml @@ -448,9 +448,8 @@ falls below <strong>maxConnections</strong> at which point the server will start accepting and processing new connections again. Note that once the limit has been reached, the operating system may still accept connections - based on the <code>acceptCount</code> setting. The default value varies by - connector type. For NIO and NIO2 the default is <code>10000</code>. - For APR/native, the default is <code>8192</code>.</p> + based on the <code>acceptCount</code> setting. The default value + is <code>8192</code>.</p> <p>For NIO/NIO2 only, setting the value to -1, will disable the maxConnections feature and connections will not be counted.</p> </attribute> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org