Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / February 2006

Tip: Looking for answers? Try searching our database.

Debugging a threads problem

Thread view: 
Chris - 12 Feb 2006 19:22 GMT
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.
Daniel Dyer - 12 Feb 2006 19:46 GMT
> 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
[quoted text clipped - 6 lines]
> 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.

Signature

Daniel Dyer
http://www.dandyer.co.uk

Chris - 12 Feb 2006 21:46 GMT
>> 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
[quoted text clipped - 14 lines]
> 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.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.