THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
- You'll need a profiler (I use YourKit), Tomcat and a copy of the app that leaks.
- Configure Tomcat for use with the profiler. This usually means setting / adding to PATH and CATALINA_OPTS in setenv.(bat|sh)
- Start Tomcat with the app deployed.
- Reload the app once.
- Start up the profiler and connected it to Tomcat.
- Get a heap dump.
- Look for instances of WebappClassLoader. If there are more instances than you have apps deployed, you have a leak.
- If there is a leak, there should be one extra instance of WebappClassLoader.
- Examine each of the WebappClassLoader objects in turn to find the one where started==false.
- Trace the GC roots of this object to find out what is holding on to a reference to that object that shouldn't be. That will be the source of the leak.
...