tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/threads/res LocalStrings.properties
Date Mon, 03 Nov 2003 21:54:24 GMT
luehe       2003/11/03 13:54:24

  Modified:    util/java/org/apache/tomcat/util/threads ThreadPool.java
               util/java/org/apache/tomcat/util/threads/res
                        LocalStrings.properties
  Log:
  Correct any maxThreads settings < 10
  
  Revision  Changes    Path
  1.16      +10 -2     jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/threads/ThreadPool.java
  
  Index: ThreadPool.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/threads/ThreadPool.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- ThreadPool.java	28 Oct 2003 20:03:01 -0000	1.15
  +++ ThreadPool.java	3 Nov 2003 21:54:24 -0000	1.16
  @@ -83,6 +83,7 @@
        * Default values ...
        */
       public static final int MAX_THREADS = 200;
  +    public static final int MAX_THREADS_MIN = 10;
       public static final int MAX_SPARE_THREADS = 50;
       public static final int MIN_SPARE_THREADS = 4;
       public static final int WORK_WAIT_TIMEOUT = 60*1000;
  @@ -200,7 +201,14 @@
       }
   
       public void setMaxThreads(int maxThreads) {
  -        this.maxThreads = maxThreads;
  +        if (maxThreads < MAX_THREADS_MIN) {
  +            log.warn(sm.getString("threadpool.max_threads_too_low",
  +                                  new Integer(maxThreads),
  +                                  new Integer(MAX_THREADS_MIN)));
  +            this.maxThreads = MAX_THREADS_MIN;
  +        } else {
  +            this.maxThreads = maxThreads;
  +        }
       }
   
       public int getMaxThreads() {
  @@ -370,7 +378,7 @@
       private static void logFull(Log loghelper, int currentThreadCount,
                                   int maxThreads) {
   	if( logfull ) {
  -            log.error(sm.getString("threads.busy",
  +            log.error(sm.getString("threadpool.busy",
                                      new Integer(currentThreadCount),
                                      new Integer(maxThreads)));
               logfull=false;
  
  
  
  1.2       +2 -1      jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/threads/res/LocalStrings.properties
  
  Index: LocalStrings.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/threads/res/LocalStrings.properties,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- LocalStrings.properties	28 Oct 2003 20:03:01 -0000	1.1
  +++ LocalStrings.properties	3 Nov 2003 21:54:24 -0000	1.2
  @@ -1 +1,2 @@
  -threads.busy=All threads ({0}) are currently busy, waiting. Increase maxThreads ({1}) or
check the servlet status
  \ No newline at end of file
  +threadpool.busy=All threads ({0}) are currently busy, waiting. Increase maxThreads ({1})
or check the servlet status
  +threadpool.max_threads_too_low=maxThreads setting ({0}) too low, set to {1}
  \ No newline at end of file
  
  
  

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


Mime
View raw message