2 Replies Latest reply on Oct 3, 2006 7:57 AM by icecuber

    PermGen memory leak

      A memory leak into the PermGen space was found during the execution of the method:

      @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
       public <E> E detach(E entity) {
       return entity;
       }



      The PermGen memory use increase each time the method is invoked.
      The method is used to detach an entity from a transaction into a JBoss application server with Hibernate3.

      Where I could report the bug?
      How could I know if is it a JBoss, Hibernate or a VM problem?

      Thanks for any help.
      Renzo

        • 1. Re: PermGen memory leak
          stnor

          We are experiencing severe problems with perm gen leaks in the server with detaching entities (with relations).

          Tested on Jboss 4.0.4 with EJB3 RC9 and different JVMs up to latest 1.6.0.

          There is a lot of classloading going on from javassist it seems that fills perm gen?

          We can't use @Remote ejbs at all, in our fairly large webbapp. @Local interfaces work well.

          • 2. Re: PermGen memory leak
            icecuber

             

            "stnor" wrote:
            We are experiencing severe problems with perm gen leaks in the server with detaching entities (with relations).

            Tested on Jboss 4.0.4 with EJB3 RC9 and different JVMs up to latest 1.6.0.

            There is a lot of classloading going on from javassist it seems that fills perm gen?

            We can't use @Remote ejbs at all, in our fairly large webbapp. @Local interfaces work well.


            We have the same problem we're using Jboss 4.0.4 with EJB3 RC9 with 1.5. jvm... but we NEED Clustering!!! is it possible to have Clustering without @Remote ejbs!?!?!?!?

            i Found an interesting article on memory management/watch

            http://www.informit.com/guides/content.asp?g=java&seqNum=250&rl=1

            with these info i see that perm gen leaks comes when the perm gen space is close to the limit whatever it is... we try with the default 64 mb and 128 mb and the problem shows up when we're close about 2/3 mb to the limit

            i found a bug on:

            http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6250214

            it's for mustang(b39) version...

            IMHO the most interesting workarounds is to launch the jvm with the params

            -XX:+CMSPermGenSweepingEnabled -XX:+CMSClassUnloadingEnabled

            that enable the permGen to be garbage collected