How to resolve OutOfMemoryError: Java heap space error.

Document ID : KB000044142
Last Modified Date : 14/02/2018
Show Technical Document Details


We have seen below error message in the IM console and server.log. What should we do?

java.lang.OutOfMemoryError: Java heap space



This message indicates that the Java heap size is not enough for the current usage.

You can change the maximum heap size by increasing the "-Xmx" value in the file.

Please restart your application server for the change to take effect. 



JBoss 5.1:


set\workpoint_client.policy -Xms256m -Xmx1024m -XX:MaxPermSize=256m -XX:ReservedCodeCacheSize=50m %JAVA_OPTS%



JBoss 6.3:


rem # JVM memory allocation pool parameters - modify as appropriate.


set "JAVA_OPTS=-Xms1G -Xmx1G -XX:MaxPermSize=256M"