Wildfly – HeapSize

The default memory setting for Wildfly are not very high and can be to less for deployed applications. The default VM settings are typically:

  • -Xms64m
  • -Xmx512m
  • -XX:MaxPermSize=256m

For production mode this can be increased by editing the “bin/standalone.conf” file. To increase the memory size from 512MB to 2GB change the following line from:

JAVA_OPTS="-Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true"


JAVA_OPTS="-Xms2048m -Xmx2048m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true"

The settings depend on the applications deployed on wildfly.

7 thoughts on “Wildfly – HeapSize

  1. can you give me a hints/reason why it is not working ?


    JAVA_OPTS=”-Xms2048m -Xmx2048m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true”

  2. If you are working with jdk 8 and wildfly 10 the options have changed a little bit.

    JAVA_OPTS=”-Xms2048m -Xmx2048m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true”

    And let me know if this works for your.

  3. I am not sure about this, but I think it depends on your OS/plattform. On a 64bit platform it should be possible to set a heap size above 2GB. For 32Bit 2GB is the maximum. This is not related to wildfly but the the Java VM.

Leave a Reply

Your email address will not be published. Required fields are marked *