Tomcat 5.5: java.lang.OutOfMemoryError: PermGen space

I so hate anything Java. There's absolutely no way a sysadmin can maintain Java apps without diving into Java as a developer. The whole VM is so different from anything else in a system that you keep getting stumped by problems that are not very clear at first glance.

Yes, of course it's because of my lack of knowledge about Java, but newsflash: I don't want to learn a language to be able to maintain the platform.

I ran into a Tomcat instance that was giving errors like "java.lang.OutOfMemoryError: PermGen space". My first inclination was to simply increase the -Xms and -Xmx options, since those were part of the config. Alas, it appears that "PermGen space" is not subject to these options. For that you need to add a -XX:MaxPermSize option. Aaargh!

Kudos to Wes Maldonado, Moazam Raja and the Apache/Tomcat FAQ for helpful hints. Also interesting is this link about how the memory usage of a JVM is built up.


Comments powered by Disqus