1

I'm trying to generate a full heapdump from Weblogic 10.3.6 due to an OutOfMemoryError generated by a Web Application deployed on the Server.

I've setted the following start script:

-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/path/to/heapdump

When the OutOfMemoryError occurs, Weblogic generates an empty hprof file (0 bytes size) in /path/to/heapdump folder, and nothing happens: the Server remains in RUNNING mode, even if is not reachable anymore. The java process is still alive, but with 0% of processor.

Even the server.out log seems completely frozen, without any trace of the OutOfMemoryError.

What's wrong with the configuration?

Alessandro C
  • 3,310
  • 9
  • 46
  • 82

3 Answers3

1

Probably you can use Java Flight Recorder to save events and check which objects are generating OOM.

(any profiler should work as well).

devwebcl
  • 2,866
  • 3
  • 27
  • 46
0

Been there :( . I remember at the time that we've found it was somewhat logical since there was not enough memory for normal operation, the JVM could not automagically find enough memory to create a heapdump either. If memory serves me well, at that time we did 2 things to debug the memory leak. First we were "lucky" enough that the problem was happening fairly regularly so a close manual monitoring was possible (monitoring of the gc.log looking for repeated FullGC and monitoring of the performance tab in the console). Knowing when the onset of the problem was starting we were doing some kill -3 to get the dump manually. We also used jstack {PID} (JDK 1.6 on Linux) with some luck. With those, at the time, the devs were able to identify the memory leak. Hope that helps.

Andre Gelinas
  • 912
  • 1
  • 8
  • 10
  • I'm trying to investigate the cause of the OutOfMemory from application side, not from the Server effect. Thanks in any case for your suggest! – Alessandro C Sep 10 '18 at 13:26
0

Okay, your configuration looks alright.. you might want to check if the weblogic process user has the rights to edit the heap dump file.

You can take heap dump by Java tools : JAVA_HOME/bin/jmap -dump:format=b,file=path_of_the_file

OR

%JROCKIT_HOME%\bin\jrcmd hprofdump filename=path_of_the_file

Mr Kashyap
  • 562
  • 1
  • 5
  • 16