On Thu, 9 Jan 2003, Joao Filipe Placido wrote:

> Date: Thu, 9 Jan 2003 14:58:02 -0000
> From: Joao Filipe Placido <[EMAIL PROTECTED]>
> To: 'Craig R. McClanahan' <[EMAIL PROTECTED]>,
>      'Tomcat Users List' <[EMAIL PROTECTED]>
> Subject: RE: HELP, PLEASE! Tomcat creates too many threads!
>
> Hi,
>
> When using SingleThreadModel in the servlets, old tomcat threads never die,
> and new threads are created for each request, so I have to restart tomcat
> once in a while. I'm using linux and JDK 1.4.1 with Tomcat 4.1.12.
>
> Anyone knows how to make old threads get killed?
>

Using SingleThreadModel (by itself) has no impact on how many threads get
created -- it only affects how many instances of your servlet get created.
(Of course, I think using STM is a bad idea anyway, because it only gives
you a false sense of security about thread safety, but that's a different
issue.)

The only reasonable way to debug this kind of situation is to trigger a
thread dump after you've tried to shut Tomcat down, to see what the
remaining threads are actually doing.  If you're running Tomcat directly
from a console window on Unix, for example, you should be able to press
CTRL+\ (backslash) to trigger the dump.

> Thank you.
>
> Joao Filipe Placido

Craig


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to