tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r694951 - in /tomcat/trunk/java/org/apache/tomcat/util/net: JIoEndpoint.java res/LocalStrings.properties
Date Sat, 13 Sep 2008 14:24:47 GMT
Author: markt
Date: Sat Sep 13 07:24:47 2008
New Revision: 694951

URL: http://svn.apache.org/viewvc?rev=694951&view=rev
Log:
Log a warning if we create the maximum number of threads

Modified:
    tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java
    tomcat/trunk/java/org/apache/tomcat/util/net/res/LocalStrings.properties

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java?rev=694951&r1=694950&r2=694951&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java Sat Sep 13 07:24:47 2008
@@ -661,6 +661,11 @@
             }
             if ((maxThreads > 0) && (curThreads < maxThreads)) {
                 curThreadsBusy++;
+                if (curThreadsBusy == maxThreads) {
+                    log.warn(sm.getString("endpoint.warn.maxThreads",
+                            Integer.toString(maxThreads), address,
+                            Integer.toString(port)));
+                }
                 return (newWorkerThread());
             } else {
                 if (maxThreads < 0) {

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/res/LocalStrings.properties
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/res/LocalStrings.properties?rev=694951&r1=694950&r2=694951&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/res/LocalStrings.properties (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/res/LocalStrings.properties Sat Sep 13 07:24:47
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.warn.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}



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


Mime
View raw message