OutOfMemoryError: PermGen space

Today, during load testing I saw one of those dreaded “java.lang.OutOfMemoryError: PermGen space” errors on our fairly large web application deployed in Tomcat running on Sun JDK 1.5.

We used to use the default (64m) for the perm space. I bumped it to 128 for now, until I can find some time to dig into this using JProfiler and JHAT.

I will be particularly looking at the amount of our classes loaded from WEB-INF/classes dir (we have a lot of generated classes from legacy code), Static references in our legacy code, Spring AOP/Hibernate CGLib usage and ThreadLocal usage in our application.

I found some useful information here:

Technorati Tags: ,

About Shashi Velur

I am Shashi Velur. I live in Austin, TX with my wife and daughter. I consider myself an experienced Enterprise Software Developer/Architect. The views expressed are mine alone and do not necessarily represent the views of my current and any of my previous employers.
This entry was posted in Java, Performance tuning and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>