Java.lang.OutOfMemoryError:PermGen Space PermGen space
Caused by-xx:permsize-xx:maxpermsize
Java.lang.OutOfMemoryError:Java Heap Space Heap Siz
Caused by-xms-xmx
Liunx modified under: catalina.sh
# OS specific support. $var _must_ is set to either true or false.
Java_opts= "-server-xms256m-xmx2048m-xx:permsize=256m-xx:maxpermsize=2048m"
Modified under Windows: Catalina.bat
Set java_opts=%java_opts%-server-xms256m-xmx2048m-xx:permsize=256m-xx:maxpermsize=2048m
echo Using catalina_base: "%catalina_base%"
-XMS: Initial heap size, minimum memory used, high CPU performance This value should be set larger. Represents the minimum size of the JVM heap (heap memory)
-xmx:java heap maximum value, maximum memory used. Represents the maximum allowable size of the JVM heap (heap memory)
The above two values are the minimum and maximum memory allocated for the JVM, depending on the size of the hardware physical memory, and are recommended to be half the physical memory.
-xx:permsize: Setting a permanent storage area for memory
-xx:maxpermsize: Set a permanent storage area for maximum memory
The permsize and MaxPermSize indicate that the virtual machine is a Java-generated object (permanate generation) such as the class object, the method object, these reflective (reflective) objects are allocated memory limits, The memory is not included in the heap memory area.
The MaxPermSize default value is related to the-server-client option.
-server option, the default maxpermsize is 64m
-client option, the default maxpermsize is 32m
Java.lang.OutOfMemoryError:PermGen Space PermGen space & Java.lang.OutOfMemoryError:Java heap Space Heap Siz