-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Alexey,
On 3/4/2009 4:52 PM, Alexey Vlasov wrote:
> After daemon starting parenting process creayes too many threads.
What is your definition of "too many"? More than one?
> I
> would like to know if they are useful and if not how to lessen their
> number.
I'm sure they are all useful. You should do a thread dump (send a SIG 3
to your process and watch stdout) on your app and see which of these
threads show up in the listing. Here's what I have in my TC 5.5.26
instance after a restart. I'm running Sun's JRE 1.5.0_13 on Linux 2.6
kernel.
JVM-created threads (you can't eliminate these):
"main" - runs the main program
"Reference Handler" - GC thread
"Finalizer" - GC thread
"Low Memory Detector" - GC thread
"CompilerThread0" - JIT thread
"Signal Dispatcher" - Handles signals
Tomcat-created threads:
"ContainerBackgroundProcessor[StandardEngine[Catalina]]"
"TP-Monitor" - monitors the request handler thread pool
"TP-Processor[n]" - these are the request handlers.
You have configured your TC instance to have between
2 and 10 of them. I wouldn't be surprised to find
that you have 5 TP-Processor threads. I have 12.
I also have this one courtesy of my MySQL driver:
"MySQL Statement Cancellation Timer" - I'm guessing this cancels statements
> $ pstree -p -a tomcat
> java,10869 -server -Xms128M
> -Xmx256M-Djava.util.logging.manager=org.apache.juli.Cl
[snipped list of 27 threads]
My thread dump contained 5 JVM threads + 14 Tomcat threads + 1 MySQL
thread = 20 threads. You have 27, and you didn't tell us a thing about
what your application does.
> <Connector address="123.123.123.123" port="50002" protocol="HTTP/1.1"
> connectionTimeout="20000" maxThreads="10" minSpareThreads="2"
> maxSpareThreads="5" />
This is the only information you gave us that could help determine what
those threads are. If you take a thread dump and re-post, we might be
able to help.
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkm2gYsACgkQ9CaO5/Lv0PACHgCbBbmoS3oGA6O1WARR46FBdHyy
1tUAmwZ4FjEdN/MV9yrOvpPNsftueJyw
=Q1lT
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]