"-XX:OnOutOfMemoryError" does not get excuted
Issue
We start EAP with JAVA_OPTS="$JAVA_OPTS -XX:OnOutOfMemoryError=\"kill -9 %p\"".
But when an OOM issue occurs, the JBoss process was not killed as expected.
We can see the log below inside JBoss console.log.
java.lang.OutOfMemoryError: Java heap space
Dumping heap to ...
Heap dump file created [4148064575 bytes in 32.996 secs]
#
# java.lang.OutOfMemoryError: Java heap space
# -XX:OnOutOfMemoryError="kill -9 %p"
# Executing /bin/sh -c "kill -9 2829"...
This happens repeatedly.
Environment
Red Hat JBoss Enterprise Application Platform 6.2.4
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
