Hi Rick.

After having had these issues for years, I started blogging about it and how to find classloader leaks [1]. I also compiled a list of API calls and third party libraries known to trigger these leaks [2], and as you can see, it is quite common both to cause these problems yourself and to have them caused by some dependency.

Having done the research, I ended up creating a small library that you can add to you web application, that will clean up strong references keeping your classloader from being garbage collected [3]. Somewhat like Tomcat has built in, but taking care of more of the known problems. I suggest you add this library to you app and watch the logs (feel free to report your findings).

Having said that, I should admit that I'm still seeing PermGen crashes running under Resin, even when there are no visible strong references to my classloader. I have not had time to investigate whether this is caused by Resin (such as the HotSwap capability), or if it is some JVM bug (and possibly something with IntelliJ, as the problem increases using the IntelliJ Resin plugin). I should probably try turning HotSwap off, or try another application server - or another JVM. Someday...

Good luck!

</Mattias>

1: http://java.jiderhamn.se/2011/12/11/classloader-leaks-i-how-to-find-classloader-leaks-with-eclipse-memory-analyser-mat/ 2: http://java.jiderhamn.se/2012/02/26/classloader-leaks-v-common-mistakes-and-known-offenders/ 3: http://java.jiderhamn.se/2012/03/04/classloader-leaks-vi-this-means-war-leak-prevention-library/

----- Original Message -----
Subject: [Resin-interest] Out of PermGen space
Date: Tue, 24 Apr 2012 13:54:40 -0700
From: Rick Mann <rm...@latencyzero.com>

When I'm making changes to the code of a webapp, Resin kindly reloads it for me. I can usually get a handful of reloads in before Resin complains about being out of PermGen space.

Is there something I'm doing wrong in my app that it leaks like this?

--
Rick


_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


--

  </Mattias>

_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

Reply via email to