[jboss-jira] [JBoss JIRA] (WFLY-4591) Memory leak in org.apache.jasper.runtime.BodyContentImpl | Wildfly 8.2.0.Final (Undertow)
Srivathsan Agaram Venkatavaradhan (JIRA)
issues at jboss.org
Wed May 13 15:49:20 EDT 2015
[ https://issues.jboss.org/browse/WFLY-4591?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Srivathsan Agaram Venkatavaradhan updated WFLY-4591:
----------------------------------------------------
Summary: Memory leak in org.apache.jasper.runtime.BodyContentImpl | Wildfly 8.2.0.Final (Undertow) (was: Full GC happening frequently in Wildfly 8.2.0.Final)
Description:
We upgraded from Jboss 7.1.1.Final to Wildfly 8.2.0.Final. After the upgrade we are seeing full frequent garbage collection (happening every 2 mins) during load test. This was not the case in Jboss 7.1.1.Final. Our heap dumps suggested that there is huge memory leak with
org.apache.jasper.runtime.BodyContentImpl. This is part of JSP runtime (jastow). On analysis we found that undertow uses default as PerThreadTagHanlderPool. By changing this to TagHanlderPool, this issue seems to vanish.
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;
- See more at: https://developer.jboss.org/message/927538#927538
I think this issue may be related to https://issues.jboss.org/browse/WFLY-4617 as there were huge garbage created and most of the contents were char array (rendered html). May be TagHanlderPool is creating more char instead of reusing from pool. Please provide thoughts. I can share, heapdump or MAT screenshots if needed.
was:
We upgraded from Jboss 7.1.1.Final to Wildfly 8.2.0.Final. After the upgrade we are seeing full frequent garbage collection (happening every 2 mins) during load test. This was not the case in Jboss 7.1.1.Final. Our heap dumps suggested that too many garbage is getting created (Around 800 MB) and getting cleaned up in full GC. Due to this CPU consumption increase by 20%.. We don't have any clue what is inside 800 MB (as it is garbage). We have not tuned wildfly as such and use its defaults . We use parallel GC.
Full GC traces
2015-05-05 16:15:54 IST| 2773.194: [Full GC [PSYoungGen: 7934K->0K(514560K)] [ParOldGen: 1045554K->459984K(1048576K)] 1053489K->459984K(1563136K) [PSPermGen: 216983K->216983K(321024K)], 0.8232410 secs] [Times: user=3.90 sys=0.00, real=0.82 secs]
2015-05-05 16:18:58 IST| 2957.412: [Full GC [PSYoungGen: 7116K->0K(513536K)] [ParOldGen: 1047424K->469811K(1048576K)] 1054540K->469811K(1562112K) [PSPermGen: 216993K->216993K(306688K)], 0.8385900 secs] [Times: user=3.90 sys=0.01, real=0.84 secs]
2015-05-05 16:21:58 IST| 3136.966: [Full GC [PSYoungGen: 6412K->0K(512000K)] [ParOldGen: 1041262K->477443K(1048576K)] 1047674K->477443K(1560576K) [PSPermGen: 217024K->217021K(293376K)], 0.8964940 secs] [Times: user=4.21 sys=0.01, real=0.90 secs]
2015-05-05 16:25:02 IST| 3320.672: [Full GC [PSYoungGen: 6789K->0K(514048K)] [ParOldGen: 1043283K->470768K(1048576K)] 1050072K->470768K(1562624K) [PSPermGen: 217028K->217028K(282112K)], 0.9000050 secs] [Times: user=4.31 sys=0.01, real=0.90 secs]
We have also set explicit GC to happen evey 10 mins. This worked fine in 7.1.1.Final where gc only happened every 10 mins.
Labels: garbage jastow undertow wildfly (was: wildfly)
Component/s: Web (Undertow)
> Memory leak in org.apache.jasper.runtime.BodyContentImpl | Wildfly 8.2.0.Final (Undertow)
> ------------------------------------------------------------------------------------------
>
> Key: WFLY-4591
> URL: https://issues.jboss.org/browse/WFLY-4591
> Project: WildFly
> Issue Type: Bug
> Components: Web (Undertow)
> Affects Versions: 8.2.0.Final
> Environment: CentOS release 6.5 (Final), java version "1.7.0_71" 64 bit VM, Wildfly 8.2.0.Final, Min heap and Max heap 1536m
>
> Reporter: Srivathsan Agaram Venkatavaradhan
> Assignee: Jason Greene
> Labels: garbage, jastow, undertow, wildfly
>
> We upgraded from Jboss 7.1.1.Final to Wildfly 8.2.0.Final. After the upgrade we are seeing full frequent garbage collection (happening every 2 mins) during load test. This was not the case in Jboss 7.1.1.Final. Our heap dumps suggested that there is huge memory leak with
> org.apache.jasper.runtime.BodyContentImpl. This is part of JSP runtime (jastow). On analysis we found that undertow uses default as PerThreadTagHanlderPool. By changing this to TagHanlderPool, this issue seems to vanish.
> 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;
> - See more at: https://developer.jboss.org/message/927538#927538
> I think this issue may be related to https://issues.jboss.org/browse/WFLY-4617 as there were huge garbage created and most of the contents were char array (rendered html). May be TagHanlderPool is creating more char instead of reusing from pool. Please provide thoughts. I can share, heapdump or MAT screenshots if needed.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
More information about the jboss-jira
mailing list