avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leif Mortenson <l...@tanukisoftware.com>
Subject Re: DO NOT REPLY [Bug 8970] New: - ResourceLimitingPool doesn't respect maximum pool size
Date Fri, 10 May 2002 14:50:10 GMT
I just added a test for this and it seems to be working correctly.  Is there
any possibility that the threads are coming from someplace else in your
system?   Try doing a CTRL-\ to get the JVM to give a thread dump.
Each of the worker threads will be named as such so it should be fairly
clear.

The thread pool kicks out fairly good debug info about when poolables
are created, destroyed and reused.  Try turning on debug output and see
if that helps.

That said, I could have missed something.  If so, the debug output would
be quite helpful.

Cheers,
Leif

bugzilla@apache.org wrote:

>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=8970>.
>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=8970
>
>ResourceLimitingPool doesn't respect maximum pool size
>
>           Summary: ResourceLimitingPool doesn't respect maximum pool size
>           Product: Avalon
>           Version: unspecified
>          Platform: Sun
>        OS/Version: Solaris
>            Status: NEW
>          Severity: Major
>          Priority: Other
>         Component: Excalibur
>        AssignedTo: avalon-dev@jakarta.apache.org
>        ReportedBy: John.Webber@jentro.com
>
>
>Our application uses an
>org.apache.avalon.excalibur.thread.impl.ResourceLimitingThreadPool; we use the
>single-arg constructor (max pool size). There is only one instance of RLTP in
>our application.
>
>After running a while (a network management application that opens a large
>number of TCP/UDP sockets) we find that the number of WorkerThreads in the
>thread stack exceeds the set maximum; the number seems to increase slowly with
>time. We tried with a maximum of 25 and with a maximum of 5 and observed the
>same behavior.
>
>Here is a code snippet showing our use of the thread pool.
>MonitorWorker is a Runnable. The threadPool variable is 
>ResourceLimitingThreadPool. The workerPool is a simple pool of MonitorWorker
>objects (based on ideas from Doug Lea's Concurrent Programming in Java, 2nd Ed.)
>
>for( int i = 0; i < monitors.length; i++ )
>{
>   MonitorWorker nextWorker = null;
>   try
>   {
>      Thread.sleep(sleepTime);
>      synchronized( this.monitors )
>      {
>         if( i < this.monitors.length )
>         {
>            nextWorker = this.workerPool.getWorker();
>            nextWorker.resetMonitor(this.monitors[i]);
>         }
>         else break;
>      }
>      this.threadPool.execute(nextWorker);					    }
>   catch (InterruptedException ie)
>   {
>      this.logger.debug("Execution interrupted");
>   }
>}
>
>The tested system is a Sun SPARC Ultra 60 running Solaris 5.8. Java VM is Java
>1.2.2 46.0(Sun Microsystems Inc.) We're using a minimum heap size of 32M, max of
>132m.
>
>If you need any more information I'll be happy to help!
>
>--
>To unsubscribe, e-mail:   <mailto:avalon-dev-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: <mailto:avalon-dev-help@jakarta.apache.org>
>
>
>  
>




--
To unsubscribe, e-mail:   <mailto:avalon-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-dev-help@jakarta.apache.org>


Mime
View raw message