tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Morten" <mor...@bilpriser.dk>
Subject Tomcat memory issues
Date Thu, 06 Sep 2007 06:15:03 GMT
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@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message