JVM crash due to perm gen spaces 99% in use problem

Source: Internet
Author: User
Tags xslt

Problem Description:

Transformerfactory tfactory = transformerfactory. Newinstance (); 
Transformer Transformer = Tfactory.newtransformer (new Streamsource (InputStream));
Transformer.transform (Xmlsource, outputtarget)//crash here

Crash,crash file summary when calling Transformer transform XSLT file to XML file in Java code:

HEAP 
 def New Generation total   314560K, used 5786K [0x04600000, 0x19b50000, 0x19b50000] 
  Eden Space 279616k,< c4/>2% used [0x04600000, 0x04ba6b80, 0x15710000) 
  from Space 34944K,   0% used [0x15710000, 0x15710000, 0x17930000]   to Spaces 34944K,   0% used [0x17930000, 0x17930000, 0x19b50000) 
 tenured generation total   699072K , used 48833K [0x19b50000, 0x44600000, 0x44600000) The space 
   699072K,   6% used [0x19b50000, 0x1cb005f0, 0x1cb006 0x44600000) 
 Compacting Perm Gen Total  86272K, used 86136K [0x44600000, 0x49a40000, 0x64600000] 
   Space 86272K,  99% used [0x44600000, 0x49a1e2f8, 0x49a1e400, 0x49a40000) 
No shared spaces configured.

Log shows Perm Gen space is not enough, transform XSLT does need to load a large number of DLL files, the most solution on the network is to increase the JVM parameter MaxPermSize value:

-xx:maxpermsize=512m

Following this method to gradually increase the number of values has been crash, and found an interesting phenomenon:

Compacting Perm Gen Total 86272K,

This value has not changed, why? Heap large enough, the JVM has not had time to increase Perm Gen is dead? The JVM parameter is then added directly to initialize:

-xx:permsize=512m

As a result the problem is solved, it seems that this is the JVM's bug and there is an empty test JRE7.

Vm_info:java HotSpot (TM) Client VM (20.4-B02) for windows-x86 JRE (1.6.0_29-B11), 
built on OCT  3 01:01:08 by "Java_re" with MS VC + + 7.1 (VS2003)

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.