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"
into
JAVA_OPTS="-Xms2048m -Xmx2048m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true"
The settings depend on the applications deployed on wildfly.
thanks
Hi Ralph Soika ,
i trying to perform this way to change wildfy 9 heap size
but it is not working .
https://developer.jboss.org/wiki/WildfyInProduction
can you give me a hints/reason why it is not working ?
standalone.conf
JAVA_OPTS=”-Xms2048m -Xmx2048m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true”
If you are working with jdk 8 and wildfly 10 the options have changed a little bit.
Try:
JAVA_OPTS=”-Xms2048m -Xmx2048m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true”
And let me know if this works for your.
I am running Eclipse and it doesn’t work for me, the solution was oppening the “Servers” view in Eclipse, double-click the Wildfly server, go to “Open launch configuation” and do that changes there in “VM argumments”. I found this info in http://www.nailedtothex.org/roller/kyle/entry/articles-wildfly-jvmparams
Is it possible to add more than 2gb? Let’s say 5gb?
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.