tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject RE: HELP, PLEASE! Tomcat creates too many threads!
Date Tue, 07 Jan 2003 20:28:07 GMT


On Tue, 7 Jan 2003, Denise Mangano wrote:

> Date: Tue, 7 Jan 2003 09:31:01 -0500
> From: Denise Mangano <DeniseM@complusdata.com>
> Reply-To: Tomcat Users List <tomcat-user@jakarta.apache.org>
> To: 'Tomcat Users List' <tomcat-user@jakarta.apache.org>
> Subject: RE: HELP, PLEASE! Tomcat creates too many threads!
>
> I am curious about the same thing.  My app isn't fully up and operational
> yet so I do not know for sure if I suffer from the same problem, but I have
> noticed that while doing some testing new threads are getting started, and
> it usually takes a restart to get rid of them.
>
> I've seen this question posted a few times, but haven't noticed any
> 'resolution' or possible solutions.  Can anyone recommend things to check
> for, settings to make, or perhaps any documentation on the issue?
>
> Is it possible that this could be a JSDK 1.4 issue?  It's the only common
> link I've noticed between my set up and other posters with this problem.
>

Tomcat creates threads as follows:

* One thread per <Host> element if you turn on autoDeploy -- should
  not have this on a production system.

* One thread per <Context> element if you use reloading -- should
  not have this on a production system.

* One thread per <Context> element for session expiration -- required.

* One thread per "processor" in your <Connector> elements.
  At startup it will create the number of threads you configure
  for "minProcessors".  The number will increase (up to the
  configured maxProcessors value) but never decrease.

For most people, tuning maxProcessors is the easiest way to control the
number of threads Tomcat creates, since that is where most of them come
from.  Be aware, though, that reducing this number also limits the number
of simultaneous requests your app will handle, since each simultaneous
request requires a processor thread.

If you're running behind Apache (via JK or JK2), you probably also want to
comment out the stand-alone connector on port 8080.  Likewise, if you're
running Tomcat standalone, you don't need the JK connector on 8009.

> Thanks :)
>
> Denise Mangano
> Help Desk Analyst
> Complus Data Innovations, Inc.
>

Craig



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


Mime
View raw message