Debugging a threads problem

C

Chris

I have a webapp which is slowly increasing the number of threads it
consumes. This only happens in production; I can't seem to duplicate the
problem in a test system.

Is there any way to get a JVM to dump information on the current threads?
Specifically, I'd like to know what method or class created each thread and
the time it was created. This might be enough to help me figure out what's
going on.
 
D

Daniel Dyer

I have a webapp which is slowly increasing the number of threads it
consumes. This only happens in production; I can't seem to duplicate the
problem in a test system.

Is there any way to get a JVM to dump information on the current threads?
Specifically, I'd like to know what method or class created each thread
and
the time it was created. This might be enough to help me figure out
what's
going on.

Ctrl-Break (Windows) or kill -3 (Linux/Solaris) will cause the JVM to do a
thread dump.

In the absence of any other evidence of a bug, I would guess that what you
are seeing is a thread pool that increases in size as the load goes up but
doesn't discard idle threads (instead it keeps them alive ready for the
next time the load spikes).

Dan.
 
C

Chris

I have a webapp which is slowly increasing the number of threads it
Ctrl-Break (Windows) or kill -3 (Linux/Solaris) will cause the JVM to do a
thread dump.

In the absence of any other evidence of a bug, I would guess that what you
are seeing is a thread pool that increases in size as the load goes up but
doesn't discard idle threads (instead it keeps them alive ready for the
next time the load spikes).

Thanks. Trouble is, this is a production system and I can't do a kill
easily. I'm wondering if there is some function I can run from within the
JVM itself.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top