Description of problem: The configuration for a web connector reports incorrect "Max Connections" if the default is used. For example, when using an APR connector, the default should be 32 * <cpu-cores>. In an 8 core system the value should then be 256, however, JBoss ON is reporting it as 4096. Version-Release number of selected component (if applicable): 3.2.0.GA How reproducible: Always Steps to Reproduce: 1. Install EAP 6.2 and configure it to use APR (native) connectors. 2. Install JBoss ON 3.2 system. 3. Import EAP 6 into inventory. 4. Configure the EAP resource's connection settings. 5. Navigate to the EAP resources _Web / Connectors / ajp_ resource's configuration page. Actual results: Max Connections value is (512 * <num-cpu-cores>) Expected results: Max Connections value is (32 * <num-cpu-cores>) Additional info: As seen in [1], if the max-connection property is null--in other words, undefined--a call is made to computeMaxConnections[2]. It is there in which this artificial default value is calculated. This calculation appears to be way off. In computeMaxConnections the schema is being used to determine the calculation. However, default values are based on the JIO connector and APR connectors (native) and have nothing to do with the schema. This has also been reported as a bug in the "description" of the "Max Connections" as seen in bug 1091235. [1]: https://github.com/rhq-project/rhq/blob/master/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/WebConnectorComponent.java#L80 if (maxConnProp.getStringValue() == null) { maxConnProp.setIntegerValue(computeMaxConnections()); } [2]: https://github.com/rhq-project/rhq/blob/master/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/WebConnectorComponent.java#L102 ... op = new ReadAttribute(getAddress(), "scheme"); res = getASConnection().execute(op); if (res.isSuccess()) { scheme = (String) res.getResult(); } ... if ("http".equals(scheme)) val = cores * 512; else if ("https".equals(scheme)) { val = cores * 512; } else if ("ajp".equals(scheme)) val = 32 * cores; return val;
The exact logic is: Normally, JIO is used (http://anonsvn.jboss.org/repos/jbossweb/branches/7.4.x/src/main/java/org/apache/tomcat/util/net/JIoEndpoint.java): -- maxThreads = (org.apache.tomcat.util.Constants.LOW_MEMORY) ? 64 : ((Constants.MAX_THREADS == -1) ? 512 * Runtime.getRuntime().availableProcessors() : Constants.MAX_THREADS); APR (native) http://anonsvn.jboss.org/repos/jbossweb/branches/7.4.x/src/main/java/org/apache/tomcat/util/net/AprEndpoint.java -- maxThreads = (org.apache.tomcat.util.Constants.LOW_MEMORY) ? 32 : ((Constants.MAX_THREADS == -1) ? 32 * Runtime.getRuntime().availableProcessors() : Constants.MAX_THREADS); NIO (unsupported I think) - http://anonsvn.jboss.org/repos/jbossweb/branches/7.4.x/src/main/java/org/apache/tomcat/util/net/NioEndpoint.java, http://anonsvn.jboss.org/repos/jbossweb/branches/7.4.x/src/main/java/org/apache/tomcat/util/net/AbstractEndpoint.java) -- maxThreads = (org.apache.tomcat.util.Constants.LOW_MEMORY) ? 32 : ((Constants.MAX_THREADS == -1) ? 32 * Runtime.getRuntime().availableProcessors() : Constants.MAX_THREADS); So usually 32 * cpus for native and 512 * cpus otherwise as Larry says.
in master commit ff200f352243cae35993485062844c0d3a17e09c Author: Lukas Krejci <lkrejci> Date: Mon Jul 21 22:00:59 2014 +0200 [BZ 1095000] Don't try to guess web connector's max connections.
commit 735365ddbf20409003e7ede9f47d4489a0f6c41a Author: Lukas Krejci <lkrejci> Date: Tue Jul 22 16:22:13 2014 +0200 [BZ 1095000] Fix test failures.
Moving to ON_QA as available to test with brew build of DR01: https://brewweb.devel.redhat.com//buildinfo?buildID=373993
moving to VERIFIED All test cases as discussed with Larry passed when tested on both http and ajp connector: - the value Max Connections is unset by default -> ok, EAP CLI shows 'undefined' if connector resource is read - changing unrelated configuration does not break configuration update -> ok, changing value of 'Max Save Post Size' succeeds, change can be seen also using EAP CLI - changing 'Max Connections' to some seemingly valid value -> ok, chaning value to 512 succeeds, change can be seen also using EAP CLI - re-check the unset checkbox again -> ok, configuration change suceeds, EAP CLI shows 'undefined' again Version:3.3.0.DR01 Build Number:6468454:dda0a47
Hey Armine, can you please help me out with some release note text for this issue. I'm drawing blanks when I try to create a succinct explanation for the fix and result.