Java OutOfMemoryError:

Source: Internet
Author: User

Java_opts, as the name implies, is a variable used to set JVM-related run parameters.


Jvm:java_opts= "-server-xms2048m-xmx2048m-xss512k"

-server: Must be the first parameter, the performance is good on multiple CPUs
-xms: Initial heap size, minimum memory used, high CPU performance when this value should be larger
-xmx:java heap maximum, maximum memory used
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: Set a permanent storage area for memory
-xx:maxpermsize: Set a permanent save area for maximum memory
-xx:maxnewsize:
-XSS 15120 This causes JBoss to consume 15M of memory as soon as each additional thread is added (thread), and the best value should be 128K, and the default value appears to be 512k. The
+xx:aggressiveheap will make XMS meaningless. This parameter allows the JVM to ignore the XMX parameter, frantically eating a g of physical memory, and then eating a G swap.
-XSS: Stack size per thread
-VERBOSE:GC actual garbage collection information
-xloggc:gc.log specify garbage collection log file
-xmn:young generation heap size, Typically set to one of 3, 4 of XMX
-XX:+USEPARNEWGC: Shorten the time collected by minor
-XX:+USECONCMARKSWEEPGC: Shorten the time for major collection
Hint: This option is in the heap Size It is more suitable to use when the major collection time is relatively large.

PermGen space is the full name of permanent Generation space, refers to the memory of the permanent storage area Outofmemoryerror:permgen space from the surface is the memory benefits, the solution must be to increase memory. Tell me why memory Benefits: This section is used to store class and meta information, and class is placed in the PermGen space area when it is loaded, unlike the heap area where instance is stored, GC (garbage Collection) PermGen space will not be cleaned during the main program's run time, so if your app will load many classes, you will likely have permgen space errors. This error is common when the Web server pre-compile the JSP. Correction method:-xms256m-xmx256m-xx:maxnewsize=256m-xx:maxpermsize=256m 2, outofmemory error occurred while redeploy in Tomcat. There are several possible reasons for this:
1, Proxool is used because the Proxool contains an older version of Cglib.
2, log4j, better not, just use common-logging.
3, the old version of Cglib, quickly update to the latest version.
4, update to the latest hibernate3.2 3,


This article is from the "Let Me Men Grow Together" blog, please be sure to keep this source http://wujingfeng.blog.51cto.com/5725921/1679166

Java OutOfMemoryError:

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.