DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21763>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21763 Tomcat 4.1.24 hangs under heavy load using http connector. ------- Additional Comments From [EMAIL PROTECTED] 2003-09-10 22:43 ------- I was considering that patch: Index: ThreadPool.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/threads/ThreadPool.java,v retrieving revision 1.13 diff -u -r1.13 ThreadPool.java --- ThreadPool.java 7 Sep 2003 13:25:26 -0000 1.13 +++ ThreadPool.java 10 Sep 2003 22:38:53 -0000 @@ -282,7 +282,17 @@ } public void run(Runnable r) { - ControlRunnable c = findControlRunnable(); + ControlRunnable c = null; + while (c == null) { + c = findControlRunnable(); + if (c == null) { + try { + Thread.sleep(20); + } catch (InterruptedException e) { + // Ignore + } + } + } c.runIt(r); } @@ -301,7 +311,17 @@ throw new NullPointerException(); } - ControlRunnable c = findControlRunnable(); + ControlRunnable c = null; + while (c == null) { + c = findControlRunnable(); + if (c == null) { + try { + Thread.sleep(20); + } catch (InterruptedException e) { + // Ignore + } + } + } c.runIt(r); } @@ -324,25 +344,7 @@ openThreads(toOpen); } else { logFull(log, currentThreadCount, maxThreads); - // Wait for a thread to become idel. - while(currentThreadsBusy == currentThreadCount) { - try { - this.wait(); - } - // was just catch Throwable -- but no other - // exceptions can be thrown by wait, right? - // So we catch and ignore this one, since - // it'll never actually happen, since nowhere - // do we say pool.interrupt(). - catch(InterruptedException e) { - log.error("Unexpected exception", e); - } - - // Pool was stopped. Get away of the pool. - if(0 == currentThreadCount || stopThePool) { - throw new IllegalStateException(); - } - } + return null; } } @@ -678,9 +680,9 @@ } finally { if(shouldRun) { shouldRun = false; - /* - * Notify the pool that the thread is now idle. - */ + /** + * Notify the pool that the thread is now idle. + */ p.returnController(this); } } Of course, I don't know to much about the pooling code, and I can't reproduce the issue to test if that fixes anything. Please go ahead and fix it if you have a working solution :) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]