users@glassfish.java.net

Help diagnosing memory leak possibly caused by TopLink cache

From: Ryan de Laplante <ryan_at_ijws.com>
Date: Wed, 10 Dec 2008 12:44:55 -0500

Hi,

I`ve been trying to figure out a memory leak for a couple of months.
The latest heap dump pointed out that there are 122802 instances of
byte[] (over 600 MB). Most of the instances I looked at are referenced
by BlobBuffer. I see that the only BlobBuffer class in memory is from
the jTDS jdbc driver (for MS SQL Server 2005). There are 95316
instances of net.sourceforge.jtds.util.BlobBuffer that reference most of
these byte[] arrays.

BlobBuffer instances are referenced by 12358 instances of
oracle.toplink.essentials.sessions.DatabaseRecord. The trail ends
there. I'm wondering if this is cache? Does JPA 1.0 RI have no
limits on cache size by default? No expiry on cached records? What
else can I do to further diagnose?


Thanks,
Ryan