Skip to Content
avatar image
Former Member

Avoiding SAP JAVA hung situation in entire SAP landscape due to heap dump generation

Hi All,

Problem: java systems getting hanged due to heap dump generation in the path /usr/sap/ resulting in service disruption. Even with the file system alerts, the generation( which happens very fast) and size of the dump file is so big(5GB-10 GB), before BASIS team could act and move/delete the heap dump files the system does reaches the hung state(might sometime would require a restart as well).

Solution :

Create a separate mount point like /usr/sap/dumps and point the dump generation in

that location rather than /usr/sap/<SID>. The size of the new file system could be 5-10 times the heap size(approx. 15-20 GB).


Question:

1.What parameters I need to tune?


2. How to get heap dump generated at will to see if the new heap dump files are getting generated in the new file system?


Regards,

Ashutosh




Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • Best Answer
    Jun 04, 2015 at 10:11 AM

    Hi Ashutosh,

    Hope you are doing good.

    In situations like this, we can proactively monitor the issue by triggering manual heap dump.

    Please see note 1004255 - How to create a full HPROF heap dump , especially this part:


    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

    Hope this helps.

    _ _ _ _ _ _ _ _ _

    Kind Regards,

    Hemanth
    SAP AGS
    _ _ _ _ _ _ _ _ _

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 05, 2015 at 11:07 AM

    Hello Vicky,

    You can change/add below parameter to change the path of heap dump-

    -XX:HeapDumpPath=<directory where to save the heap dumps>

    Refer SAP notes 1004255 and 710154 to know how to generate heap dump.

    Regards,

    Ashish

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 05, 2015 at 12:50 PM

    Do a quick analysis of heap dump using MAT.

    Also, then tune your memory parameters.

    Regards,

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 09, 2015 at 04:41 AM

    Hi Ashish and Hemant, One more doubt: I went through the notes and found -XX:HeapDumpPath=OOM.hprof. My concern is as per the AP note 1004255 , it says change it to: -XX:HeapDumpPath= So the question is: 1. say I created /usr/sap/dump then the path would be -XX:HeapDumpPath=/usr/sap/dump or -XX:HeapDumpPath=//usr/sap/dump/OOM.hprof Please clarify my doubt. I want the log name for out of memory same. Only the patch should be /usr/sap/dump. Regards, Vicky

    Add comment
    10|10000 characters needed characters exceeded