title: java.lang.OutOfMemory:PermGen exception in Apache tomcat
body: <p>Few days ago, I noticed that I'm occasionally seeing a <code>java.lang.OutOfMemory: PermGen</code> exception when my Java web site runs under Tomcat.</p>
  
  <p>I read about this error online and understand why this exception occurs.  I followed a tutorial to increase my <code>MaxPermSize</code>, and edited by <code>catalina.sh</code> to contain the following:</p>
  
  <pre><code>    JAVA_OPTS="-Djava.awt.headless=true -Dfile.encoding=UTF-8 
      -server -Xms1536m -Xmx1536m
      -XX:NewSize=256m -XX:MaxNewSize=256m -XX:PermSize=256m 
      -XX:MaxPermSize=256m -XX:+DisableExplicitGC"
  </code></pre>
  
  <p>However, I would like to understand more about my PermGen capabilities:</p>
  
  <ol>
  <li><p>Can anyone tells me how I can understand my server capability in order to give the appropriate new size?</p></li>
  <li><p>Moreover does anyone know how I can make memory measurements on Apache tomcat?</p></li>
  </ol>