tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Johnny Kewl" <>
Subject Re: jstack and Tomcat 6 on Windows
Date Sat, 20 Sep 2008 10:20:25 GMT

----- Original Message ----- 
From: "Brian Clark" <>
To: "Tomcat Users List" <>
Sent: Saturday, September 20, 2008 12:58 AM
Subject: Re: jstack and Tomcat 6 on Windows

> Thanks everyone for their suggestions.
> Unfortunately, that doesn't help me with my particular issue. I have a 
> memory leak in one of my apps, and when the system runs out of memory, it 
> stops responding to new requests. I have a script that will detect this 
> condition and automatically restart Tomcat. I was hoping to add a jstack 
> command to this script to give me a thread dump prior to restarting Tomcat 
> to give me better troubleshooting information. Your solution would work 
> under normal circumstances, but I don't know how to script a ctrl+break. 
> ;-)


Oh... I dont know if trying to find the issue on production server is going 
to be easy...
Out Of Mem ... scary.... start praying that it is, one of your apps...
Normally JMeter and a quiet system is the easiet way to find which one is 
the problem...

The later JDK's 6 do what you looking for... google for JHAT... here ...

Notice the HeapDumpOnOutOfMemoryError java option...

And also check out JMX, JConsole.... you may find all that useful... esp the 
force heap garbage collection option.

Another rough guide is runs the various web-apps thru the browser... and 
watch the window handles... not the memory...
If that keeps sliding up... thats the bad webapp... trouble with all the 
Java monitoring stuff is that unless a GC is done (at least twice), what you 
looking at doesnt mean much....

I've never tried the JHat stuff... but they made it because OOM errors are a 
nightmare... let us know if JHat is the thing we all being waiting for ;)

Good Luck ;)

The most powerful application server on earth.
The only real POJO Application Server.
See it in Action :

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message