db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Knut Anders Hatlen <knut.hat...@oracle.com>
Subject Re: Memory leak?
Date Thu, 08 Mar 2012 13:48:54 GMT
John English <john.foreign@gmail.com> writes:

> I have a webapp running under Jetty 8 using Derby It runs fine
> for a few weeks and then grinds to a halt (which on a Windows box also
> grinds Windows to a halt). It sometimes crashes with an OutOfMemoryError
> with a message that it can't create any more native threads (and I don't
> get a heap dump when this happens, despite requesting one with the
> HeapDumpOnOutOfMemoryError).
> I've managed to get use JMX to get a heap dump and analyse it with the
> Eclipse Memory Analyser. This is before it crashes, after about a week
> of operation, and shows about 7MB tied up in a ConcurrentCache object.
> I'm not familiar with the internals of Derby implementation, but the
> leak suspect report from Eclipse is below.
> Is there anyone who can help me understand what is going on here?

This looks like the page cache, which keeps parts of the database in
memory in order to improve the performance. It looks around 70% full
(based on the number of CacheEntry and PageKey instances being ~700, and
the default page cache size being 1000), so it might grow to about 10MB,
but it probably won't go much higher than that.

If that's too much for your application, you can reduce the size of the
page cache.


Hope this helps,

Knut Anders

View raw message