1

my Application uses a lot of heap (-Xmx7g) and still it will run to an OutOfMemory-Exception. So I tried to save the heap with the -XX:+HeapDumpOnOutOfMemoryError JVM-Option. But after the file was created successfully, the programm runs into this Exception: java.lang.OutOfMemoryError: Java heap space: failed reallocation of scalar replaced objects

Thanks in advance

2
  • According to Rolf, a program should die after OutOfMemoryError is encountered. Notice, it's an extension of VirtualMachineError not Exception. So, you should expect all kinds of bad things to happen after that error is handled. Commented Feb 14, 2020 at 12:30
  • 1
    What did you expect? The -XX:+HeapDumpOnOutOfMemoryError does exactly what its name suggests, it creates a heap dump on OutOfMemoryError not instead. Commented Feb 14, 2020 at 16:53

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.