Jboss Memory Overflow problem!

Source: Internet
Author: User
Tags garbage collection jboss



A few days ago the company a Project Server broken, changed a backup server replacement, but did not run for a while on the downtime, has been reported java.lang.OutOfMemoryError .... See here, you know is memory overflow, but JBoss's memory configuration has reached 1024M, and the JBoss memory monitoring results Look, is not high, how can panic, very strange. A long time or no result. Depressed ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~] But before I changed, I looked at the log again and found a problem. After the java.lang.OutOfMemoryError of the newspaper there is content: Java.lang.OutOfMemoryError:PermGen space, this seems and java.lang.OutOfMemoryError: Java Heap Space This is not the same. Finally, I found this anomaly.
PermGen space is the full name of the permanent Generation spaces, refers to the permanent storage area of memory. This section is used to store class and meta information, class is placed in the PermGen space area when it is load, and is different from the heap area where instance is stored, GC (garbage Collection) PermGen space will not be cleaned up during the main program run, so if your app will load a lot of classes, PermGen space error is likely to occur. This error is common when the Web server is pre compile the JSP.
Correction method, add in Run.bat:-xms512m-xmx1024m-xx:maxnewsize=256m-xx:maxpermsize=256m
Because many of the jar packages are referenced in the project, the class information in these jar packages is loaded into the PermGen space area by the JBoss class loader, which, in the JVM's default case, is only 4 m in size, with a lot of love in the jar package condition, it is obviously not enough, so you can solve the problem by-xx:maxpermsize=256m the maximum value.
I have 6 applications loaded into my jboss, jar bag and class add up to 100m or so, with this parameter, all OK, finally after the server repaired, found that this is the JBoss inside the configuration, ah ~ ~ seems to back up later, the best or the JBoss together back out.
And when there appears java.lang.OutOfMemoryError:Java heap space This anomaly, by adjusting-xms512m-xmx1024m this can be solved.

In addition, this two-parameter-XX:+USEPARALLELGC-XX:+USEPARALLELOLDGC allows the service to reclaim memory space in parallel. However, after these two parameters are configured, they will also occupy a certain amount of memory space.







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.