Java app memory leak, performance

Posted in :

Reading Time: < 1 minute

A collection, I will add my comments later. Symptom: PermGen run out of space

Memory leak
Overview (Mark Thomas)

Memory leak happened in multiple deployment (more likely happens in development)

Tomcat 7 (Mark Thomas)

Application or library code that can trigger this situation include:
JDBC driver registration
Some logging frameworks
Storing objects in ThreadLocals and not removing them
Starting threads and not stopping them

There are also a number of places that using the standard Java API can trigger a similar issue. These include:
Using the javax.imageio API (the Google Web Toolkit can trigger this)
Using java.beans.Introspector.flushCaches() (Tomcat does this to prevent memory leaks caused by this caching)
Using XML parsing (the root cause is unknown due to a bug in the JRE)
Using RMI (somewhat ironically, causes a leak related to the garbage collector)
Reading resources from JAR files

Overview and use VisualVM to debug memory leak (Colm Divilly)

Nikita Salnikov-Tarnovski

Overview of memory and performance of J2EE app (PDF, Steven Haines)

%d bloggers like this: