Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I have got the same prolem when I run my web application under tomcat or jetty. Permanent genration memory is used for loading the classes and the idea is that "Classes are loaded once and forever". Since I am using quite a lot of libraries and Spring framework, this memory is filled up very quickly espectially when I redeploy the web application several time with out restarting the servlet container.</p> <p>I found that increasing the maximum permanent generation is not sufficient. You also need to allow the garbage collection to removed the unused classes at runtime, otherwise it will be filled up and throws PermGen space exception. Here are the JVM options that I added for my servlet containers,</p> <pre><code>-XX:PermSize=128m -XX:MaxPermSize=256m -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled </code></pre> <p><code>-XX:MaxPermSize</code> is used to set the maximum value of permanent generation. This should be greater than the default size.</p> <p><code>-XX:+CMSClassUnloadingEnabled</code> this option is used to allows JVM to unload the class at runtime. By default, class unloading is disable. For Java 5, please read <a href="https://stackoverflow.com/questions/3717937/cmspermgensweepingenabled-vs-cmsclassunloadingenabled">this</a>.</p> <p><code>-XX:+UseConcMarkSweepGC</code>, in order for class uploading option to work, this option must also be set (<a href="https://stackoverflow.com/questions/3717937/cmspermgensweepingenabled-vs-cmsclassunloadingenabled/3720052#3720052">ref</a>)</p> <p>Also, you should consider upgrading your JVM version. Java 5 is too old.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload