QuestionQ72

VerifiedConfiguring and Monitoring WebLogic Server

A Managed Server that belongs to a large domain occasionally throws java.lang.OutOfMemory errors (OOM).

You have monitored this server with the jvisualVM tool, but it was not helpful because the issue occurs infrequently and is not tied to a particular scenario. You therefore decide to force the server to dump heap memory as soon as an OOM is thrown so that you can analyze the dump file later.

How should you modify the Java HotSpot startup command to enable this feature and save the dump in the D:\hprof-dumps\ directory?

Explanation

The HotSpot option -XX:+HeapDumpOnOutOfMemoryError enables an HPROF heap dump when a java.lang.OutOfMemoryError occurs. -XX:HeapDumpPath specifies the directory or file path for that dump, so D:\hprof-dumps is the required destination. Oracle Java command-line options

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!