Friday, 31 March 2017

Wildfly 8.2 Heap Issue


In Wildfly 8.2, We face out of memory error due to Heap memory gets filled.

Following configuration needs to be added in order to avoid heap issue:

Java 8 does not support Perm gen settings.Instead we need to specify MaxMetaspaceSize.

In order to run MaxMetaspaceSize,Make sure JAVA_HOME is set to JDK 1.8.

JAVA_OPTS="$JAVA_OPTS -XX:MaxMetaspaceSize=256M"

Also The memory leak work around needs to be added.

# Memory Leak issues
JAVA_OPTS="$JAVA_OPTS -Djboss.remoting.pooled-buffers=false"


Happy Learning.

1 comment:

  1. this issue is not specific to any application server..any application using java 8 may need this setting to avoid out of memory issues..Also, to do RCA of mem leaks in code we need heap dump file to be generated for an outofmemory issues..this can be activated using the below setting ..
    -XX:HeapDumpOnOutOfMemoryError -XX:HeapDumpPath="path to genrate heap.dump file". Heap dump file is generated with .hprof extension amd can be analysed using memory analyzer tool from.eclipse. Happy Learning.

    ReplyDelete