Christopher Schultz schrieb:
| When there is an OutOfMemory, it's impossible to make a ThreadDump. The
| reason is that, since you lack memory, it can be seen as useless to try
| allocating  StackTrace object and stuff it in a new Error(). Moreover,
| from my experience, when you are out of memory, the location where you
| are out if generally irrelevant, as it's most of the time cause by a
| memory leak somewhere else.

True. On the other hand, you /can/ get a heap dump if you're using Sun's
Java 1.6.x using this JVM option:

-XX:+HeapDumpOnOutOfMemoryError

-chris

... and also for 1.4.2_12+ or 1.5.0_07+ (although in combination with parallel young GC better with 1.4.2_15+).

In addition there is: -XX:HeapDumpPath=FILENAME

FILENAME, if relative, will be relative to the working directory, for Tomcat relative to bin/.

For Java 6 (and I think also recent 1.4.2 but maybe not Java 5) there is also -XX:OnOutOfMemoryError=<command>. You could experiment with putting a "kill -QUIT" to your process into the command script. Don't know, if the externally triggered thread dump needs Java memory allocation.

Regards,

Rainer



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to