0 Replies Latest reply on Apr 30, 2015 5:05 AM by Srivathsan Agaram Venkatavaradhan

    Full frequent garbage collection in wildfly 8.2.0 Final

    Srivathsan Agaram Venkatavaradhan Newbie

      We moved from Jboss AS 7.1.1 to wildfly 8.2.0 Final. After upgrade, we are seeing full frequent garbage collection on running 60 user load test. Full gc were not able to recover any memory. On analysis we found that org.apache.jasper.runtime.BodyContentImpl is having 1 gb of retained heap. We found root cause in PerThreadTagHandlerPool.java . Patched TagHandelrPool

      diff --git a/src/main/java/org/apache/jasper/runtime/TagHandlerPool.java b/src/main/java/org/apache/jasper/runtime/TagHandlerPool.java

      index eaa8560..c6c785f 100644

      --- a/src/main/java/org/apache/jasper/runtime/TagHandlerPool.java

      +++ b/src/main/java/org/apache/jasper/runtime/TagHandlerPool.java

      @@ -53,7 +53,7 @@ public class TagHandlerPool {

                       result = null;

                   }

               }

      -        if( result==null ) result=new PerThreadTagHandlerPool();

      +        if( result==null ) result=new TagHandlerPool();

               result.init(config);

       

               return result;

       

      This fixed memory leak issue, however we are seeing full frequent gc's every 2 mins when running load test.  Full gc is able to recover memory. On analyzing heap dump found most of the heap area is remainder(350 MB) in Eclipse MAT , io.undertow.server.session.InMemorySessionManager occupies around 17 MB and org.hibernate.internal.SessionFactoryImpl occupies around 17.5MB

       

      Tried multiple options

      1. Ourmax heap is 1536m,  decreased to 1024m and increased to 2048m and 4096m. No benefits

      2. Change XX:NewRatio to 3, but no help.

       

      Appreciate your inputs.