tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r730241 - in /tomcat/tc6.0.x/trunk: ./ java/org/apache/tomcat/util/net/ java/org/apache/tomcat/util/net/res/ webapps/docs/
Date Tue, 30 Dec 2008 21:22:45 GMT
Author: markt
Date: Tue Dec 30 13:22:45 2008
New Revision: 730241

URL: http://svn.apache.org/viewvc?rev=730241&view=rev
Log:
Log an info message if we create max threads for one of the connector thread pools.

Modified:
    tomcat/tc6.0.x/trunk/STATUS.txt
    tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
    tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java
    tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
    tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/res/LocalStrings.properties
    tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=730241&r1=730240&r2=730241&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Tue Dec 30 13:22:45 2008
@@ -60,15 +60,6 @@
   +1: pero, fhanik, markt, jim
   -1: 
 
-* Fix log a warning if we create maxThreads
-  http://svn.apache.org/viewvc?rev=694951&view=rev (JIO)
-  http://svn.apache.org/viewvc?rev=708195&view=rev (APR, NIO)
-  http://svn.apache.org/viewvc?rev=708223&view=rev (Change log level)
-  +1: markt, fhanik, jim
-   0: remm (logging could pile up quickly)
-      markt Because thread count only grows there will only ever be one log message
-  -1: 
-
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=44382
   Use HttpOnly for session cookies. This is enabled by default. Feel free to
   caveat your vote with a preference for disabled by default.

Modified: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=730241&r1=730240&r2=730241&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Tue Dec 30 13:22:45
2008
@@ -944,6 +944,11 @@
             }
             if ((maxThreads > 0) && (curThreads < maxThreads)) {
                 curThreadsBusy++;
+                if (curThreadsBusy == maxThreads) {
+                    log.info(sm.getString("endpoint.info.maxThreads",
+                            Integer.toString(maxThreads), address,
+                            Integer.toString(port)));
+                }
                 return (newWorkerThread());
             } else {
                 if (maxThreads < 0) {

Modified: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java?rev=730241&r1=730240&r2=730241&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java Tue Dec 30 13:22:45
2008
@@ -661,6 +661,11 @@
             }
             if ((maxThreads > 0) && (curThreads < maxThreads)) {
                 curThreadsBusy++;
+                if (curThreadsBusy == maxThreads) {
+                    log.info(sm.getString("endpoint.info.maxThreads",
+                            Integer.toString(maxThreads), address,
+                            Integer.toString(port)));
+                }
                 return (newWorkerThread());
             } else {
                 if (maxThreads < 0) {

Modified: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=730241&r1=730240&r2=730241&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Tue Dec 30 13:22:45
2008
@@ -1074,6 +1074,11 @@
             }
             if ((maxThreads > 0) && (curThreads < maxThreads)) {
                 curThreadsBusy++;
+                if (curThreadsBusy == maxThreads) {
+                    log.info(sm.getString("endpoint.info.maxThreads",
+                            Integer.toString(maxThreads), address,
+                            Integer.toString(port)));
+                }
                 return (newWorkerThread());
             } else {
                 if (maxThreads < 0) {

Modified: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/res/LocalStrings.properties
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/res/LocalStrings.properties?rev=730241&r1=730240&r2=730241&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/res/LocalStrings.properties (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/res/LocalStrings.properties Tue Dec
30 13:22:45 2008
@@ -26,6 +26,7 @@
 endpoint.debug.unlock=Caught exception trying to unlock accept on port {0}
 endpoint.err.close=Caught exception trying to close socket
 endpoint.noProcessor=No Processors - worker thread dead!
+endpoint.info.maxThreads=Maximum number of threads ({0}) created for connector with address
{1} and port {2}
 
 endpoint.init.bind=Socket bind failed: [{0}] {1}
 endpoint.init.listen=Socket listen failed: [{0}] {1}

Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?rev=730241&r1=730240&r2=730241&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Tue Dec 30 13:22:45 2008
@@ -245,6 +245,9 @@
       <fix>
        Make certain that classes are first loaded by trusted code when working in a sandbox.
(billbarker)
       </fix>
+      <add>
+        Log a message if we reach maxThreads in a connector thread pool. (markt)
+      </add>
     </changelog>
   </subsection>
   <subsection name="Jasper">



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message