cancel
Showing results for 
Search instead for 
Did you mean: 

Heap Dump or Thread Dump

former_member263733
Participant
0 Kudos

We are establishing a support standard around thread dumps and heap dumps for our portal

In order to obtain reliable files, SAP suggests multiple thread dumps over a short period of time. Our issue is that the paramter in ConfigTool is set such that when the thread dump is executed, it also triggers a heap dump. This takes several minute to run, and prolongs any "outage" or slownes such that we cannot afford to spend any addtional time collecting more than a single thread dump.

So, for us, circumstances are such that we can't get both a series of thread dumps and heap dump at the same time.

Since the thread dump, along with the output from pslist, provides information about threads and CPU we are thinking about taking out the paramter to always execute the heap dump with the thread dump.

We would still leave the parameter in to autoamaticaly trigger a heap dump on an out of memory condition. This would only apply to the parameter for manual executions.

If we do take that parameter out, we aren't sure if / how we would still be able to execute a heap dump if we needed to.

Just wondernig if anyone else has any experience with this kind of situation and how they have approached it - or if our setup is just "off base" that we need to rethink some things.

Thanks for any input you

Accepted Solutions (0)

Answers (2)

Answers (2)

shankha_saha
Explorer
0 Kudos

Hi Jeff,

This is quite common problems for JAVA systems. As the heap dump is the dump of the heap memory consumed at the time of OOM issue, it alwayes takes time and space both for creating dumps.

Better you get the heap dumps manually when you notice OOM issue. For that you can remove the script to create heap dump automatically at OOM. But you should write the code to enable your system to craete heap dump Manually.

-Xdump:heap:events=user,request=exclusiveprepwalkcompact - this means a heap dump can be

generated by user events(manual triggering), and it will be generated under work folder if the file parameter

is not specified.

Using kill -3 <J2EE_node PID> or through

jcmon, you will get a system dump in addition to the thread dump

(javacore).

Please consider to have enough space in the file system available.

The system dump size will be at least the Java heap size (Xmx

setting).

Thanks

Shankha

Former Member
0 Kudos

Hi,

This is from the SAP Note 1004255 - How to create a full HPROF heap dump of J2EE Engine 6.40/7.0

There are two ways to get a heap dump in the HPROF binary format from the JVMs which support the feature:

Automatically, when an OutOfMemoryError occurs

    Add -XX:+HeapDumpOnOutOfMemoryError to the java options of the server (see note 710146 "How to change J2EE Engine JVM Settings")

    On the first occurrence (only) of an OutOfMemoryError the JVM will write a heap dump in the /usr/sap/<SID>/<instance>/j2ee/cluster/server<N> directory

    Output file name format is java_pid<pid>.hprof


On request

    Add -XX:+HeapDumpOnCtrlBreak  to the java options of the server (See note 710146 "How to change J2EE Engine JVM Settings")

    One has to trigger a SIGQUIT (UNIX) or CTRL_BREAK event (Win). The procedure to trigger the event is the same as for getting a thread dump (see note 710154)

    Output file name format is: java_pid<pid>.hprof.<timestamp> in the /usr/sap/<SID>/<instance>/j2ee/cluster/server<N> directory

Br,

Venky