java.lang.OutOfMemoryError: Java heap space


add line to or catalina.bat:

export CATALINA_OPTS=”-Xms512M -Xmx1024M”

a) The -Xmx argument defines the max memory size that the heap can reach for the JVM. A low value can cause OutOfMemoryExceptions or a very poor performance if your program’s heap memory is reaching the maximum heap size.
b) The -Xms argument sets the initial heap memory size for the JVM. This means that when you start your program the JVM will allocate this amount of memory instantly.

About the author

By kalpesh.surana