Java.lang.OutOfMemoryError:PermGen Space PermGen space & Java.lang.OutOfMemoryError:Java heap Space Heap Siz

Source: Internet
Author: User
Tags xms

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.