Enda O' Brien wrote:
>
> I have set the minProcessors for http from 5 to 1 and this has reduced
> the number of threads to 18. I have commented out the AJP connector's
> part of the server.xml, so it shouldn't start any threads. Is there any
> other way to reduce the number of threads? It's not so much that they
> are causing problems, but I'd like to know why they're there.
>

 Excellent! Too many people just accept this sort of thing at
face value, and end up never knowing how their software really
works.

 I'd have to see your server.xml to be sure, and it varies a bit
from version to version, but you're going to find stuff like:

 - Java system threads. Several of these. Try writing a little
   program whose main() just calls Sleep(120*1000), and then
   to a ps. You get more than one thread, right?

 - Tomcat auto-deploy threads. Something has to watch for
   changes to your servlets in order to reload-on-change,
   right? So there are threads for this.

 - Tomcat session timeout threads. Something has to check
   if a session has timed out.

 - Connectors have "workers", and as you found out, you can
   control the number of workers in the pool. But there needs
   to be a main "acceptor" thread for each Connector as well.

 If you run "bin/catalina.sh debug", wait for startup, and
then type "threads", you'll get a list. Or you can run under
various IDE's and get the same effect. If you've got questions
about particular threads, then you can post here or to the
tomcat-users list.


--
Christopher St. John [EMAIL PROTECTED]
DistribuTopia http://www.distributopia.com

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to