tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <>
Subject RE: configuration of thread pool used by Tomcat
Date Thu, 07 Aug 2003 13:36:56 GMT


>How does thread creation/destruction works in Tomcat?

Read the source code.

>Is the total no. of threads in thread pool maintained by Tomcat varies as >load varies? 


>Does Tomcat destroys threads in the pool, if they are idle for the long >time? If yes,
is there way to ensure that Tomcat didn't kill the idle >threads, ie., once created, a
thread will never die as long as Tomcat is >running?

Usually no, and that renders the second part of your question irrelevant.

>If I keep Min_no_of_threads = Max_no_of_threads = 20, then can I assume >that Tomcat
will always use 20 threads?


You have to be more precise: are you talking about request processing threads, or all threads
in the server?  You have control over the former by using the minProcessors and maxProcessors
parameters of a <Connector> element.  The latter you don't control.

Lazy/greedy creation, destruction of idle threads has been discussed in the past: you can
search the archives for more information.  Better yet, if you read the source and have a gee-whiz
enhancement, contribute it ;)

Yoav Shapira

This e-mail, including any attachments, is a confidential business communication, and may
contain information that is confidential, proprietary and/or privileged.  This e-mail is intended
only for the individual(s) to whom it is addressed, and may not be saved, copied, printed,
disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately
delete this e-mail from your computer system and notify the sender.  Thank you.

View raw message