  | Mailing List | | Home | | Forum Home | | JBoss - Java Application Server | | Tomcat - JSP/Servlet container | | Struts - A MVC web framework | | iText - An open source PDF Java Library | | JDOM - JDOM XML Parser | | JSP - A mailing list about Java Server Pages specification and reference | | J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition | | J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog | | Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology | |
Struts & Hibernate
|
|
|
  | | | Tomcat memory issues | Tomcat memory issues 2007-09-06 - By Morten
Back Hi
We have implemented a picture/pdf server in Tomcat. The pictures are cached in a map. When the memory is nearly full, some entries are removed from map.
However, eventually the entries in the map become fewer and fewer even though the memory consumption stays high. In other words more and more memory are used outside the map.
According to a heap dump done by jmap, there are many org.apache.tomcat.util.buf.ByteChunk instances referencing large byte[], which we suspect to be previously used pictures.
We have tried both Tomcat 5.5.9 and Tomcat 6 under JBoss 4.2.0. Both showed the same behaviour.
Are there any way to stop Tomcat from cached these large byte[] internally?
The object graph looks like this:
The byte[] is referenced from: - ByteChunk (A) - ByteChunk (B)
ByteChunk (A) is referenced by: - org.apache.tomcat.util.buf.C2BConverter (AA) - org.apache.tomcat.util.buf.IntermediateOutputStream (AB) - org.apache.catalina.connector.OutputBuffer (AC)
ByteChunk (B) is referenced by: - org.apache.catalina.connector.OutputBuffer (AC)
C2BConverter (AA) is referenced by: - HashMap$Entry (AAA) - org.apache.catalina.connector.OutputBuffer (AC)
IntermediateOutputStream (AB) is referenced by: - org.apache.tomcat.util.buf.C2BConverter (AA) - org.apache.tomcat.util.buf.WriteConvertor (ABA) - sun.nio.cs.StreamEnocder (ABB)
OutputBuffer (AC) is referenced by: - org.apache.catalina.conncetor.CoyoteOutputStream (ACA) - org.apache.catalina.connector.CoyoteWriter (ACB) - org.apache.catalina.connector.Response (ACC)
HashMap$Entry (AAA) is referenced by: - <class>[]
org.apache.catalina.conncetor.CoyoteOutputStream (ACA) is referenced by: - org.apache.catalina.connector.Response (ACC)
org.apache.catalina.connector.CoyoteWriter (ACB) is referenced by: - org.apache.catalina.connector.Response (ACC)
org.apache.catalina.connector.Response (ACC) is referenced by: - org.apache.catalina.connector.ResponseFacade (ACCA) - <class>[] (ACCB) - org.apache.catalina.connector.Request (ACCC)
I cannot find any trace of any JBoss or any webapp class.
Any help appreciated, Morten
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ To start a new topic, e-mail: users@(protected) To unsubscribe, e-mail: users-unsubscribe@(protected) For additional commands, e-mail: users-help@(protected)
|
|
 |