PermGen Space situation

Source: Internet
Author: User
Tags serialization

Recently this time, the server ran a permgen space situation, before also encountered. Due to improper use of cglib.

But this time it doesn't use Cglib's related class library. Error log information is also particularly strange, the log information is as follows:

Java.lang.OutOfMemoryError:PermGen Space
At Java.lang.Class.getDeclaredMethods0 (Native method)
At Java.lang.Class.privateGetDeclaredMethods (class.java:2427)
At Java.lang.Class.getDeclaredMethod (class.java:1935)
At Java.io.ObjectStreamClass.getPrivateMethod (objectstreamclass.java:1382)
At java.io.objectstreamclass.access$1700 (objectstreamclass.java:52)
At Java.io.objectstreamclass$2.run (objectstreamclass.java:438)
At Java.security.AccessController.doPrivileged (Native method)
At Java.io.objectstreamclass.<init> (objectstreamclass.java:413)
At Java.io.ObjectStreamClass.lookup (objectstreamclass.java:310)
At Java.io.ObjectOutputStream.writeObject0 (objectoutputstream.java:1106)
At Java.io.ObjectOutputStream.defaultWriteFields (objectoutputstream.java:1509)
At Java.io.ObjectOutputStream.writeSerialData (objectoutputstream.java:1474)
At Java.io.ObjectOutputStream.writeOrdinaryObject (objectoutputstream.java:1392)
At Java.io.ObjectOutputStream.writeObject0 (objectoutputstream.java:1150)
At Java.io.ObjectOutputStream.writeObject (objectoutputstream.java:326)
At Java.util.ArrayList.writeObject (arraylist.java:570)

......

When the program is running, it is caused by a serialization operation, which currently causes an unknown cause (due to serialization itself or because other local operations affect the serialization operation), and is currently in check and debug ....

In addition, through the online search situation, the current error occurred in the 09 time, it is also a lot of people only found that soon (most of the foreign forums).

After the results, and then tell everyone (if someone also encountered such an error message and resolved, please give me a hint, hehe).

The three-day check found that the-XNOCLASSGC parameter was set at startup because the JVM parameter was improperly set, causing the class area to not be reclaimed (because the server integrates dynamic language Jython).

The problem was identified, but why the serialization operation was used to the class store, and later discovered by printing GC details:

[Unloading class sun.reflect.GeneratedSerializationConstructorAccessor1530]
[Unloading class sun.reflect.GeneratedSerializationConstructorAccessor1600]
[Unloading class sun.reflect.GeneratedSerializationConstructorAccessor1598]
[Unloading class sun.reflect.GeneratedSerializationConstructorAccessor1592]
[Unloading class sun.reflect.GeneratedSerializationConstructorAccessor1596]

You can guess the serialization, you need to replicate in the class store, and finally because the class store is not enough, the final error message appears.

Additional prompts, after setting the-XNOCLASSGC, the server performance promotion is obvious, mainly manifests in the day full GC the number of times is 3-4 times. If this parameter is not set, the one-hour full GC will have 2-5 times (Hardware environment: 8 kernel CPU,4GB memory.) Refer only to specific projects).

About JVM parameter Descriptions Reference I reproduced a "JVM Startup parameters Encyclopedia," About JVM tuning Reference I reproduced a "JVM parameter tuning."

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.